Chris_E
Thread Starter
- Joined
- Feb 16, 2006
- Messages
- 360
Hi team,
I want to be able to hide a number of controls depending on other selections in my form. This one gets me started but I don't know how to use the resulting string!!
This works:
The strings "Me.InstallQtyExistingLineI2_1.Visible=False" to "Me.InstallQtyExistingLineI2_1o.Visible=False" are messaged up ok.
How do I make these strings useable in VBA to actually hide the 10 controls?
Hope you can help!?
Chris
I want to be able to hide a number of controls depending on other selections in my form. This one gets me started but I don't know how to use the resulting string!!
This works:
Code:
Dim Apart As String
Dim BPart As String
Dim StateStr As String
Apart = "Me.InstallQtyExistingLineI2_"
BPart = ".Visible=False"
For i = 1 To 10
StateStr = Apart & i & BPart
MsgBox StateStr
Next i
How do I make these strings useable in VBA to actually hide the 10 controls?
Hope you can help!?
Chris