Hi,
I have a function I'm creating where I want to be able to pass a label name (or command button name, etc.), append the string ".visible" to it, and toggle the value of this property. My problem is, right now in my comparison this property is a string, so I'm getting a type mismatch:
cmdVariable = "SomeCommandButtonName"
strVariable = cmdVariable & ".visible"
if strVariable = True then
... here I want to change it to false, etc.
End if
In the code above, strVariable is being treated as "cmdVariable.visible" instead of cmdVariable.visible
So how can I make a string to be treated as a normal name, without the quotation marks???
Tia,
Ray
I have a function I'm creating where I want to be able to pass a label name (or command button name, etc.), append the string ".visible" to it, and toggle the value of this property. My problem is, right now in my comparison this property is a string, so I'm getting a type mismatch:
cmdVariable = "SomeCommandButtonName"
strVariable = cmdVariable & ".visible"
if strVariable = True then
... here I want to change it to false, etc.
End if
In the code above, strVariable is being treated as "cmdVariable.visible" instead of cmdVariable.visible
So how can I make a string to be treated as a normal name, without the quotation marks???
Tia,
Ray