Can VBA do this?

worldwidewall

New Member
Joined
May 28, 2011
Messages
31
Hi

I am trying to use VBA to close all programs that are open except for the excel file that is running the vba.

Thanks

Dave
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
HOTPEPPER

I beleive that script requires me to know the name of the application(s) that I need to clsoe which is not ideal. Also, it looks to me like that would step through all the processes running on the computer which I assume are the same as what you see when you run Task Manager and then click processes. If I stop all of those I might be in trouble. I only need to close the active programs, the ones that I can switch between using ALT TAB.

Thanks

Dave
 
Upvote 0
Why are you wanting to close everything?
 
Upvote 0
GTO

I want to close everything because I have a script that opens a program and does a bunch of stuff and somtimes there is an error and it does not close the program. And then the next time it tries to run there are more errors. But I realize now that I might be able to use the code that hot pepper suggested as I can figure out the names of the executables I need to shutdown.

Thanks

Dave
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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