Stuart_C Posted December 9, 2010 Posted December 9, 2010 Ive created a custom report template in SIMS that after generating my report copies the data into another spreadsheet. The problem is that after running (which it does fine) I am left with two extra copies of excel open in the background that I don't really need. Is there a way in VBA to close down other copies of excel? I've seen the code to colse the activeworkbook but that's the one I need open. It's the other's I need to close.
mac_shinobi Posted December 9, 2010 Posted December 9, 2010 (edited) Could try something like so Close the Internet Explorer Window - VBA Visual Basic for Applications (Microsoft) FAQ - Tek-Tips You can use similar code as I have seen it , to search through the window titles and if it matches a specific title then to close said application / exe http://vbadud.blogspot.com/2009/04/how-to-kill-word-process-using-vba.html Will dig around later to see if I can find an example of finding a specific window by its title and then killing said process - this example seems to be similar http://www.andreavb.com/tip020021.html Edited December 9, 2010 by mac_shinobi
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now