G
Gig
I would like to set the value of all textboxes in a Userform to
"nothing" on an event. I can do this the long way by writing a line of
code for each textbox, but I'm thinking there is a faster/better way
by using "For Each - Next construct. I've got the following code, but
keep getting error messages. Can anyone tell me what's wrong with
this?
Private Sub CommandButton2_Click()
For Each TextBox In UserForm1
Value = ""
Next TextBox
End Sub
Thanks,
Greg
"nothing" on an event. I can do this the long way by writing a line of
code for each textbox, but I'm thinking there is a faster/better way
by using "For Each - Next construct. I've got the following code, but
keep getting error messages. Can anyone tell me what's wrong with
this?
Private Sub CommandButton2_Click()
For Each TextBox In UserForm1
Value = ""
Next TextBox
End Sub
Thanks,
Greg