Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible to exit Excel completely from a macro?
I'm trying to run a auto open macro that will open a second workbook, save
data there and then shut down Excel completely. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible to exit Excel completely from a macro?
Application.quit
if you want to save stuff first For Each w In Application.Workbooks w.Save Next w Application.Quit -- -John Please rate when your question is answered to help us and others know what is helpful. "salt417" wrote: I'm trying to run a auto open macro that will open a second workbook, save data there and then shut down Excel completely. Is this possible? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible to exit Excel completely from a macro?
Not sure what you mean by "save data there", but this code will Open a new workbook... save it to a directory... then close all open workbooks and exit Excel. Sub Test() Dim wrk As Workbook Set wrk = Workbooks.Add wrk.SaveAs "C:\Blah\Blah.xls" Application.Workbooks.Close Application.Quit End Sub On Dec 15, 2:27 pm, salt417 wrote: I'm trying to run a auto open macro that will open a second workbook, save data there and then shut down Excel completely. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Completely Exit Excel Macro | Excel Discussion (Misc queries) | |||
deleting a macro completely | Excel Discussion (Misc queries) | |||
macro wants to exit excel | Excel Discussion (Misc queries) | |||
Write macro don't ask to save when exit excel | Excel Programming | |||
How do i create a command button or macro to exit Microsoft Excel | Excel Worksheet Functions |