Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close and Exit Excel
Jeff wrote:
I don't know if there is a statement in VBA to close and exit Excel. I am able to close my workbook using the 'close' statement, but I leaves excel running. I would like a complete exit of excel and have the machine return to the desktop Application.Quit? cheers, Stephan. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close and Exit Excel
Jeff wrote:
Application.quit closes the file but leaves excel running, as well as the VB editor, although the editor may be incidental, due to my use of the editor. Hmm, I just tried it and Application.Quit closes all workbooks *and* terminates Excel on my machine. The help documents gives the following sample which should save all workbooks and close Excel afterwards. And that's excactly what the fragment does (on my machine). For Each w In Application.Workbooks w.Save Next w Application.Quit Sorry, I guess that doesn't really help you. cheers, Stephan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close and Exit Excel
-----Original Message----- Jeff wrote: Application.quit closes the file but leaves excel running, as well as the VB editor, although the editor may be incidental, due to my use of the editor. Hmm, I just tried it and Application.Quit closes all workbooks *and* terminates Excel on my machine. The help documents gives the following sample which should save all workbooks and close Excel afterwards. And that's excactly what the fragment does (on my machine). For Each w In Application.Workbooks w.Save Next w Application.Quit Sorry, I guess that doesn't really help you. cheers, Stephan . Thanks for the Help. I will investigate my machine(s). Have three and only tried it on the oldest. Thanks again for the help, and ignore the next post from me! Good Hunting Jeff |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close and Exit Excel
In Excel VBA working in the current instance of Excel,
Application.Quit will close all workbooks and close Excel. If you are calling it from using Excel as an automation server, then if there is an existing reference to Excel that hasn't been released, excel will continue to be visible in the task manager. In the first case, there may be things that could cause Excel not to close, but the normal behavior is for Excel to close. -- Regards, Tom Ogilvy "Jeff" wrote in message ... -----Original Message----- Jeff wrote: I don't know if there is a statement in VBA to close and exit Excel. I am able to close my workbook using the 'close' statement, but I leaves excel running. I would like a complete exit of excel and have the machine return to the desktop Application.Quit? cheers, Stephan. . Application.quit closes the file but leaves excel running, as well as the VB editor, although the editor may be incidental, due to my use of the editor. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I close all workbooks and exit excel with one click? | Excel Discussion (Misc queries) | |||
Close vs. Exit in 2007 | Excel Discussion (Misc queries) | |||
why do all excel worksheets/workbooks close when I close one? | Excel Discussion (Misc queries) | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel |