Excel VBA to quit current excel Apllication not others

michaelchen

New Member
Joined
Mar 17, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi everyone, is there any way I can quit only the excel application I put code not other excels?

I tried to use Application.quit but it close everything I open. Since there are possibilities user is working on something in other excel, I don't want to close everything.

Thank you!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Application.quit will close only the application hosting the code.
Are you sure you have other excel instances open or do you just have other workbooks open within the current excel instance ?
 
Upvote 0
Application.quit will close only the application hosting the code.
Are you sure you have other excel instances open or do you just have other workbooks open within the current excel instance ?

I have the same problem... Looks like not solvable
 
Upvote 0
Have a look in the task manager (ALT+CTRL+DEL) and check how many excel instances there are under the Details tab .
 
Upvote 0
Have a look in the task manager (ALT+CTRL+DEL) and check how many excel instances there are under the Details tab .
Have a look in the task manager (ALT+CTRL+DEL) and check how many excel instances there are under the Details tab .

Have a look in the task manager (ALT+CTRL+DEL) and check how many excel instances there are under the Details tab .
Thank you! I find the way to solve it. We can use applicaiton.windows to close it!
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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