Indirect addressing

  • Thread starter Thread starter GC
  • Start date Start date
G

GC

Hello,

I have 2 variables called sys1 and sys2. I need to assign values to these 2
variables within a loop.
i.e.
For X = 1 to 2
sys(X) = CurrentSystemValue
Next

What is the correct syntax. I tried "sys "& X and that did not work.

Thanks in advance,
Cheers!
 
You cannot do that unless sys is an array.

Dim sys(2) as Variant
For X = 1 to 2
sys(X) = CurrentSystemValue
Next


If this post helps click Yes
 
Back
Top