I have a number of textboxes on a user for that I need to perform the same action on. I am trying to write a loop that will take a common part of the name and add a numbe to the end. This new text then becomes the textbox name
Private Sub Loop1()
Dim Coretext, Newtext
Coretext = "Textbox"
For i = 1 to 12
newtext = coretext & i
me.newtext.visible = false
Next
End sub
In theory textbox 1 to 12 should nowq be hidden but I cannot fugure out how to get VBA to accept "newtext" as object name
Thanks
Private Sub Loop1()
Dim Coretext, Newtext
Coretext = "Textbox"
For i = 1 to 12
newtext = coretext & i
me.newtext.visible = false
Next
End sub
In theory textbox 1 to 12 should nowq be hidden but I cannot fugure out how to get VBA to accept "newtext" as object name
Thanks