Theseekers
Technical User
Hi Tekers,
I am passing 4 controls to a function to do some tests. In the function I reference them as InputVar1, InputVar2..etc.
In stead of address them individually, I am looping them in a for and next loop. My problem is that I don't know how to format the variable name so that I can use in the loop. For instance, I need to check to see if the control is a text box or a dropdown list so normally I would use this to test it:
If typeof (Inputvar1) is textbox then
...do thing
However, in the loop I would like to substitute the index 1 with the loop control variable something like this:
If typeof (inputvar & lcv) then...
I have tried these methods so far but none is working.
if typeof ("InputVar" & lcv)
if typeof (input + lcv)
dim s as tring = "InputVar"
if typeof s & lcv then ...
can someone lend me a hand on how to concatenate the name InputVar along with the loop index so I can address them programatically..
TIA
I am passing 4 controls to a function to do some tests. In the function I reference them as InputVar1, InputVar2..etc.
In stead of address them individually, I am looping them in a for and next loop. My problem is that I don't know how to format the variable name so that I can use in the loop. For instance, I need to check to see if the control is a text box or a dropdown list so normally I would use this to test it:
If typeof (Inputvar1) is textbox then
...do thing
However, in the loop I would like to substitute the index 1 with the loop control variable something like this:
If typeof (inputvar & lcv) then...
I have tried these methods so far but none is working.
if typeof ("InputVar" & lcv)
if typeof (input + lcv)
dim s as tring = "InputVar"
if typeof s & lcv then ...
can someone lend me a hand on how to concatenate the name InputVar along with the loop index so I can address them programatically..
TIA