userform close when i close another excel file

azizls4

New Member
Joined
Aug 4, 2023
Messages
25
Platform
  1. Windows
hello
I have UserForm, when I open another Excel file and then close it, UserForm closes automatically. Is there a code I add to UserForm that prevents it from being closed when I close another Excel file?
thank you
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
hello
I have UserForm, when I open another Excel file and then close it, UserForm closes automatically. Is there a code I add to UserForm that prevents it from being closed when I close another Excel file?
thank you
Does setting the ShowModal form property to False work?
 
Upvote 0
Does setting the ShowModal form property to False work?
When UserForm works, it hides its Excel file, only UserForm is in the interface, but when I open another Excel file and close it, UserForm also closes
 
Upvote 0
When UserForm works, it hides its Excel file, only UserForm is in the interface, but when I open another Excel file and close it, UserForm also closes
What does this mean?

only UserForm is in the interface

Do you activate the workbook containing the Userform before closing the other workbook?
 
Upvote 0
Are you using Excel 2016?
If you close the new workbook from the File | Close menu, the problem doesn't happen. The problem only happens when you close the workbook from the excel main titlebar X close button.
I think this is a bug in excel 2016 and has nothing to do with the userform... I think if you update to the latest version of Office, this issue should be fixed.
 
Upvote 0
What happens when you manage the opening and closing of workbooks from the Userform?
 
Upvote 0
Are you using Excel 2016?
If you close the new workbook from the File | Close menu, the problem doesn't happen. The problem only happens when you close the workbook from the excel main titlebar X close button.
I think this is a bug in excel 2016 and has nothing to do with the userform... I think if you update to the latest version of Office, this issue should be fixed.
Yes, I use Excel 2016, and I tried to make a showmodal in the properties True and Fulse, but it did not work
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,035
Members
449,092
Latest member
ikke

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