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.
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
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
Last edited by mac_shinobi; 9th December 2010 at 05:05 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)