C
Christopher Panadol
I write VBA in Excel 2003. I have a program which have the serveral
variables, say, var1, var2, var3. Every time when I need to put a value to
these 3 variables I need to write the code as follows:
for i = 1 to 3
select case i
case 1
var1 = <value>
case 2
var2 = <value>
case 3
var3 = <value>
end select
next i
Is there a way to simplify the code that can convert the string to
variables? Sorry for my poor English. Thank you very much!
variables, say, var1, var2, var3. Every time when I need to put a value to
these 3 variables I need to write the code as follows:
for i = 1 to 3
select case i
case 1
var1 = <value>
case 2
var2 = <value>
case 3
var3 = <value>
end select
next i
Is there a way to simplify the code that can convert the string to
variables? Sorry for my poor English. Thank you very much!