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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top