Jump to content
Macro Express Forums

Increment variable name


mgrantom
 Share

Recommended Posts

Please excuse my ignorance, but I have tried to find the answer in the knowledgebase and in the forum to no avail. I have an application that displays records containing 45 fields. I need to capture all 45 fields. I’m trying to use the Repeat with variable function. After the repeat statement, I want to use clipboard clear and copy to put the first field contents into variable T1. I then want to tab to the next field and have the next value clipboard copied into T2 etc until all 45 fields are captured. This is probably really basic, but I can’t figure out how to increment the variable name to the next number T2, T3 etc. Am I missing something really basic here? Any help would be appreciated. Thanks

Link to comment
Share on other sites

What you want to do is use something like %T%N1%% to access a sequential series of variables (%T1%, %T2%, %T3%, etc.) inside a repeat loop. To do this you need to enable the Variable Evaluation Level. If using Macro Express v 3.7 or later click Options, Preferences, Miscellaneous, Advanced and set the 'Variables Evaluation Level' to 1 or 2.

 

For information about this feature see the Macro Express News - July 13, 2005 newsletter and the User Submitted Macro - Variable Evaluation Level shared macro page.

 

Other discussions on this topic within this discussion forum can be found at these links:

Link to comment
Share on other sites

  • 2 years later...

What you want to do is use something like %T%N1%% to access a sequential series of variables (%T1%, %T2%, %T3%, etc.) inside a repeat loop. To do this you need to enable the Variable Evaluation Level. If using Macro Express v 3.7 or later click Options, Preferences, Miscellaneous, Advanced and set the 'Variables Evaluation Level' to 1 or 2.

 

For information about this feature see the Macro Express News - July 13, 2005 newsletter and the User Submitted Macro - Variable Evaluation Level shared macro page.

 

Other discussions on this topic within this discussion forum can be found at these links:

 

 

Ahhhhh, I had tried to do this but ME complained so I assumed it could not be done. Thanks. Now if I can just remember the logic I was going to use it in ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...