Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs macro: How do I specify "Replace existing file?"
Hello,
I have an excel macro that saves under a specific name everyday. I DO want to replace that file when I save it. How do I tell the SaveAs to overwrite the previous file? Here's my code. ActiveWorkbook.SaveAs Filename:= _ "C:\file.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False I have to use SaveAs and not Save because my macro Copies/Pastes as value before saving under another name. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs macro: How do I specify "Replace existing file?"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _ "C:\file.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Application.DisplayAlerts = True -- Regards, Tom Ogilvy wrote in message oups.com... Hello, I have an excel macro that saves under a specific name everyday. I DO want to replace that file when I save it. How do I tell the SaveAs to overwrite the previous file? Here's my code. ActiveWorkbook.SaveAs Filename:= _ "C:\file.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False I have to use SaveAs and not Save because my macro Copies/Pastes as value before saving under another name. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Find" a wildcard as a place marker and "replace" with original va | Excel Discussion (Misc queries) | |||
Insert "Proper Function" into existing macro | Excel Worksheet Functions | |||
turn off the " replace file?" question when saving excel files | Excel Programming | |||
within a macro how can I suppress the warning pop "A file named xxxx.xls already exists in this location. Do you want to replace it?" | Excel Programming | |||
How do you replace an existing file, saying "yes" in a macro? | Excel Programming |