VB to Reset userform to blanks

keith

Board Regular
Joined
Mar 3, 2002
Messages
88
Custom form called by a command button on sheet. After form is sucessfully called, filled out and submitted the data adds to my list. The next time the form is called it is prefilled out with the values of the last time it was used. I need the form to be blank each time is it called.. I assume I can put a "reset" statement before the UserForm1.Hide at the end of the form but I dunno the syntax.. THANKS!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
On 2002-03-06 14:28, keith wrote:
Custom form called by a command button on sheet. After form is sucessfully called, filled out and submitted the data adds to my list. The next time the form is called it is prefilled out with the values of the last time it was used. I need the form to be blank each time is it called.. I assume I can put a "reset" statement before the UserForm1.Hide at the end of the form but I dunno the syntax.. THANKS!

Try using:

<pre>
Unload Userform1
</pre>

This destroys the form instead of just hiding it. This will reset the form.

Cheers
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top