Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
what is the code to close a file for a macro
I need to close a file in a macro but I am not sure how to do it. I could
use the following but when I use this a pop up screen says do you want to save the changes to the file. I don't want to save the changes. Is there any code to use that will eliminate the pop up asking me to save the file. ActiveWindow.Close ---- Celia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
what is the code to close a file for a macro
Worbooks("Book.xls").Close SaveChanges:=False
-- Regards Dave Hawley www.ozgrid.com "Celia" wrote in message ... I need to close a file in a macro but I am not sure how to do it. I could use the following but when I use this a pop up screen says do you want to save the changes to the file. I don't want to save the changes. Is there any code to use that will eliminate the pop up asking me to save the file. ActiveWindow.Close ---- Celia |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
what is the code to close a file for a macro
or staying along the lines of your original code: ActiveWindow.Close (False) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to close and reopen file | Excel Programming | |||
How to code the Macro to save and close a file? | Excel Discussion (Misc queries) | |||
Close file and run macro from newly opened file | Excel Programming | |||
VBA code to automatically close file | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |