Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables within variables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'd like to use a variable within another variable. For example:
Dim test1
test1 = 57
Dim test

test = ("test" & 1)

The value of test become "Test1" instead of the value of the variable test1 (57). I'd like to use a step function to get values for test1, test2, test3....

Is there anyway to convert this string into the value of a variable?

 
You may want to use an array.

Dim test(10)
Dim someothervariable

test(1)=57
someothervariable = test(1)

or

For i = 1 to 10
MsgBox test(i)
Next [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top