Excel UserForm textboxes and checkboxes???

T

TotallyConfused

I have a Userform with textboxes and checkboxes. I want to add a "Cancel"
command button that when clicked on button it will ask if you want to cancel
the form. If yes, clear all textboxes and checkboxes. If no, leave as it
and continue. How do I write this code? Any help will be greatly
appreciated. Thank you.
 
T

TotallyConfused

Thank you for responding. However, realized that I want to keep only one
text box from clearing? It is a Date textbox. Me.txtFormDate = Date
'Me.FormDate = format(date,"mm-dd-yyyy"). Is this possible to clear
everything else but this one textbox? Thank you.
 
J

Jacob Skaria

Since you need to reset the date in this text box. Add the below line after
the code Simon has given.

Me.FormDate = format(date,"mm-dd-yyyy")

If this post helps click Yes
 
T

TotallyConfused

Thank you very much. So easy, I was close but was making it complicated.
Thanks again very much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top