for next with variables

F

Frank Dulk

I have variables A1, A2, A3, A4, A5

I want to use them in the following way

For i = 1 to 5 "A" & i = Valor Next

In other words, to use all the variables with the next for
 
P

Piet Linden

I have variables A1, A2, A3, A4, A5

I want to use them in the following way

For i = 1 to 5    "A" & i = Valor    Next

In other words, to use all the variables with the next for

if you declare A as an array, you can loop through the subscripts.

Dim A(1 to 5) as integer
for intCounter = 1 to 5
'do something with A(intCounter)
next intCounter
 
F

Frank Dulk

thank you


"Piet Linden" <[email protected]> escreveu na mensagem
I have variables A1, A2, A3, A4, A5

I want to use them in the following way

For i = 1 to 5 "A" & i = Valor Next

In other words, to use all the variables with the next for

if you declare A as an array, you can loop through the subscripts.

Dim A(1 to 5) as integer
for intCounter = 1 to 5
'do something with A(intCounter)
next intCounter
 

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

Top