Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Macro to close excel
I have been using the ActiveWorkbook.save ActiveWorkbook.Close (False) commands to first ensure the spreadsheet saves and then closes. The problem I am having is that this leaves Excel open. With 8 spreadsheets running daily each using this .Close command, I end up with an awful lot of open excel windows. I use Scheduler in conjunction with the Auto_Open macro to activate the spreadsheets to run automatically. I have tried to use the 'Stop the task if it runs for - 59 minutes' setting but this doesn't get rid of Excel off the screen either but appears to just generate a Dr Watson. Has anyone got the command to close excel completly from within the macro. Thanks for reading, and helping Rgds Okanem -- okanem ------------------------------------------------------------------------ okanem's Profile: http://www.excelforum.com/member.php...fo&userid=9301 View this thread: http://www.excelforum.com/showthread...hreadid=388260 |
#2
|
|||
|
|||
Application.Quit
-- HTH Bob Phillips "okanem" wrote in message ... I have been using the ActiveWorkbook.save ActiveWorkbook.Close (False) commands to first ensure the spreadsheet saves and then closes. The problem I am having is that this leaves Excel open. With 8 spreadsheets running daily each using this .Close command, I end up with an awful lot of open excel windows. I use Scheduler in conjunction with the Auto_Open macro to activate the spreadsheets to run automatically. I have tried to use the 'Stop the task if it runs for - 59 minutes' setting but this doesn't get rid of Excel off the screen either but appears to just generate a Dr Watson. Has anyone got the command to close excel completly from within the macro. Thanks for reading, and helping Rgds Okanem -- okanem ------------------------------------------------------------------------ okanem's Profile: http://www.excelforum.com/member.php...fo&userid=9301 View this thread: http://www.excelforum.com/showthread...hreadid=388260 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to close excel | Excel Discussion (Misc queries) | |||
excel macro to update visio orgchart | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
Problem Editing Macro in Shared Excel File | Excel Discussion (Misc queries) | |||
Macro not working with Excel 2003 | Excel Discussion (Misc queries) |