How do you reinitialize a UserForm? (SOLVED)

phantom1975

MrExcel MVP
Joined
Jun 3, 2002
Messages
3,962
I have a UserForm that has a MsgBox that appears upon exiting. If the MsgBox is vbYes, then the UserForm Unloads. If the MsgBox is vbNo, then I need to have the UserForm to start from scratch (reinitialize.) I figured I could just unload the UserForm and the reload it. Is there another way to do it?

_________________
Pass on what you have learned. Support this great website by clicking on the sponsor's ads!.
This message was edited by phantom1975 on 2002-08-23 13:07
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hide won't initialize the UserForm though. Unload isn't that tough, however, I was wondering what other approaches there might be.
 
Upvote 0
What routines have you got in the initialize
code of your userform ??

If you have routines that Initialize the userform then just call this

eg

Dim a
a = MsgBox("finsh", vbYesNo)
If a <> vbYes Then
UserForm_Initialize
Cancel = True
End If
 
Upvote 0
I didn't realize that you could call an event-based procedures! My guess is that it will only call the procedure that is in the same module (unlike macros that are in the Project Modules.) Thanks for the simple piece of advice!
 
Upvote 0

Forum statistics

Threads
1,222,405
Messages
6,165,867
Members
451,989
Latest member
DannyBoy1977

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