Attempt to reopen userform not working

SilencioDubueno

New Member
Joined
May 26, 2022
Messages
4
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello all! I'm attempting at making a userform that has certain buttons/conditions that will close and reopen the blank form as needed. The code I've always used for it is by having a sub that does it.

VBA Code:
Sub Reset()
Unload UserForm
UserForm.Show
End Sub

I am expecting it to close the userform and then reopen it. Whenever this code is run, it will shut down the userform and seemingly stop/terminate the code. I have tried hardcoding the Unload/show section into the various sections within the userform code, as well as setting it into a module outside the userform, and having the sections call it instead. Nothing seems to work.
Any help is greatly appreciated!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,140
Messages
6,123,266
Members
449,093
Latest member
Vincent Khandagale

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