Hello Everyone,
Can you please put a vba code for the "clear entry" button to clear all entry in the textboxes in the userform. There are 12 textboxes.
Thank you.
Hello Everyone,
Can you please put a vba code for the "clear entry" button to clear all entry in the textboxes in the userform. There are 12 textboxes.
Thank you.
Re: Clear button in userform
[vb] Dim ctl As Control
With Me
For Each ctl In .Controls
If TypeName(ctl) = "TextBox" Then
ctl.Value = vbNullString
End If
Next
End With[/vb]
Re: Clear button in userform
Hi
Where do you want me to place this code? I am not sure what you want me to do.
Thank you
Re: Clear button in userform
Double click on Clear Entry button and paste the code there.
Re: Clear button in userform
Thank you guys.
The problem has been resolved.
Really appreciated all your time.
Re: Clear button in userform
it would not be a bad idea to set default value for each box, rather than clearing them
Say, new button called "Reset",
Textbox_1 = 1
Textbox_2 = Format(now(),""dd/mm/yyyy")
Textbox_3 = ""
....
Don’t have an account yet? Register yourself now and be a part of our community!