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!

Creating a variable from a value

Status
Not open for further replies.

bacarey

Programmer
Feb 8, 2001
1
US
I want to create a variable from the value of another variable and a constant

example

dim var1 as integer
dim var2 as integer
dim var3 as integer

for i = 1 to 3
var"i" = i +1
next i
 
Use an array like this. This will put 1 in var(1), 2 in var(2) and 3 in var(3).

dim var(3) as integer

for i = 1 to 3
var(i) = i
next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top