I am looping through some code using a For loop. The iterative variable is "i". I have dimensioned the following variables prior to the For Loop. L1, L2, L3, L4 as strings. I want to reference these strings inside the For loop by somehow referring to "L" & char(i). So like a comparison of a value "Foo" <> "L" & Char(i), should result is testing "Foo" against the string stored in variable L1, when i=1. Or against L2 when i=2 and so on.
My previous programming experience is Visual FoxPro and all I had to do was prefix an & on the front of the string and it then referenced the variable whose name is stored in the string.
So if L1 stored "Bar", and I wanted to compare I could write &L1 == "Bar". I need to be able to do this with VB6. Can anyone help?