kevman123
asked on
Use a variable to identify a variable
Is there a way to use a variable to identify a variable-- for example:
Value1ID as integer
Value2ID as integer
Value3ID as integer
For x=1 to 3
Value & x & ID = 123*x
Next x
Value1ID as integer
Value2ID as integer
Value3ID as integer
For x=1 to 3
Value & x & ID = 123*x
Next x
Hi kevman123,
Use an array:
Dim ValueID(3) as Integer
For x = 1 to 3
ValueID(x-1) = 123*x
Next x
bkt
Use an array:
Dim ValueID(3) as Integer
For x = 1 to 3
ValueID(x-1) = 123*x
Next x
bkt
Gah! Sorry AW.
Too slow.
Too slow.
ASKER
That's the problem, it is already an array- sorry I forgot to put that-
Value1ID(3) as integer
Value2ID(3) as integer
Value3ID(3) as integer
For x=1 to 3
Value & x & ID(x) = 123*x
Next x
Value1ID(3) as integer
Value2ID(3) as integer
Value3ID(3) as integer
For x=1 to 3
Value & x & ID(x) = 123*x
Next x
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I guess I could use a 2 dimensional array- however, I would like to know if my original question is possible, not just a workaround.
ASKER
We're on the same wavelength!
Using arrays is the only way I know of doing that in VB.
ASKER
Ok- I'll hold out for a little bit and see if anyone has an answer for it- otherwise I'll just give you the points since you gave the most feedback-
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I believe a split is in order here- thanks for the quick responses guys!
ASKER
Well, I should have reversed the assisted and accepted answers- anyhow- thanks again-
as long as the points were assigned the same, Accepted and Assisted are irrrelevant. And as for the points, with just 9,900,000 more, I can get a Tall Mocha Latte at Starbucks for only $4.50 LOL.
AW
AW
AW, agreed.
>ust 9,900,000 more... ROFL
>ust 9,900,000 more... ROFL
Dim ValueID(3) as Integer
For x=1 to 3
ValueID(x) = 123*x
Next x
AW