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 find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

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