![]() |
Killing Excel :)
Hi ,
I use the task scheduler to run Excel Macros nightly. Each morning I have to kill Excel process :( However, I use 'Application.quit' syntax at the end of each macro and I set ObjXl=Nothing How can I automatically kill the process or what can be done to avoid this 'Excel TSR' ? OS:Win2000 Excel 2000 TIA, Nicky. |
Killing Excel :)
Hi Nicolas,
Are you trying to close Excel from within Excel VBA? If so, you may want to do something like this before you invoke the Quit method: Sub PrepareToQuit() Dim wb As Workbook For Each wb In Workbooks wb.Saved=True Next wb End Sub That will mark all open workbooks as saved already, so Excel shouldn't hang out in the background when you Quit. Of course, if you actually want to save any of the files, you should do that explicitly. -- Regards, Jake Marx www.longhead.com Nicolas Mainczyk wrote: Hi , I use the task scheduler to run Excel Macros nightly. Each morning I have to kill Excel process :( However, I use 'Application.quit' syntax at the end of each macro and I set ObjXl=Nothing How can I automatically kill the process or what can be done to avoid this 'Excel TSR' ? OS:Win2000 Excel 2000 TIA, Nicky. |
All times are GMT +1. The time now is 11:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com