Assign Variable to Textbox Name and Set Visible Property
Posted on 2006-05-05
Can I assign a variable to the name of a textbox and then set the visible property?
My string variable is "strFailCode". I look up the value of Fail Code in a table and then add "txt" to the front of the name.
I then want to turn off the visible property of the textbox in code.
(For example: the first record in the table would be BentPins and the textbox is Named txtBentPins, so my variable would be equal to "txtBentPins")
Using strFailCode.Visible won't work of course, is there a way to let VB6 recognize that strFailCode is the textbox name?
I am new to VB coding.