How to Concatenate a variable name in a vba loop ?

T

tmb

Const Value1 as long = 5
Const Value2 as long = 12
Const Value3 as long = 7

For i = 1 to 3
MsgBox Value & i '<-- How to do this properly?
Next i

I want MsgBox to display 5 then 12 then 7
I can't figgure out how to get Value and i to combine properly to do this.

thanks for any help.

PS - This is a repost as I didn't ask the question correctly last time.
 
B

Bob Phillips

But you are happy with the last answer you got?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
T

tmb

I am happy Bob.

thanks for the help.

Bob Phillips said:
But you are happy with the last answer you got?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

That's okay, just checking as the times seemed to suggest this came after
the last posting.

Regards

Bob
 

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