Close just one userform

thedogg

Board Regular
Joined
Sep 22, 2015
Messages
154
Is it somehow possible to close just one userform if I have had two opened? I have a button in userform1 which is calling userform2 but if I close userform 2 both are gone. I know that I can call/show again userform1 but I want to avoid doing it. If I did so I wouldn't keep the chnges I had made.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
This is not default behaviour. I created your scenario and the first userform does not close.
- so there must be something in your code or settings that makes this happen

Please post
... the procedure that calls userform2 (the complete procedure)
... the procedure that closes UserForm1
... UserForm_Deactivate if either userform use this procedure
... is there anything pertaining to UserForm1 status in UserForm2's UserForm_Initialize or UserForm_Activate

Please use code tags around your code by clicking on # icon above post window first and pasting your code between the tags
thanks
 
Upvote 0
If you close a Userform like this you loose all the data in the Userform

Unload UserForm1

If you close a Userform like this you do not loose the data in the Userform as long as the Workbook stays open
UserForm1.Hide
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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