Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the Form
How can clear or reset the form using a commandbutton
thanx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the Form
There isn't built-in way to clear a user forms controls back to
their default state. You would have to loop through the Controls collection and reset the controls, or do each one individually. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Saj" wrote in message ... How can clear or reset the form using a commandbutton thanx |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the Form
What do you mean by form - Userform with controls, or a worksheet made to
look like a paper form. What do you want to clear. Be specific. The basic approach would be to loop through the items containing entries and clear them individually. -- Regards, Tom Ogilvy "Saj" wrote in message ... How can clear or reset the form using a commandbutton thanx |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the Form
Clear the UserForm or reset to default
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the Form
The following code will clear out the text boxes on a form. You
can adapt the code for other types of controls. Private Sub CommandButton1_Click() Dim C As MSForms.Control For Each C In Me.Controls If TypeOf C Is MSForms.TextBox Then C.Text = "" End If Next C End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Saj" wrote in message ... Clear the UserForm or reset to default |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the Form
Unload it, then show it again.
Don't try to reshow it from its own event code - have the original calling routine show it again. -- Regards, Tom Ogilvy "Saj" wrote in message ... Clear the UserForm or reset to default |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to clear all checkboxes on a form? | Excel Worksheet Functions | |||
How do I clear 'form' content from an unprotected cell without mac | Excel Worksheet Functions | |||
CLear Data Entry Form Fields | Excel Discussion (Misc queries) | |||
Clear a Checkbox in a a user form | Excel Discussion (Misc queries) | |||
clear specific cells in a form | Excel Discussion (Misc queries) |