Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Save As in a macro.
I am trying to set up a macro to save a back up of a file before
making changes to the file. When I try to back up the file by saving it over the existing file I get a prompt asking me if I want to overwrite the old file, wich I do. But I want the macro to do this automaticly without promting the user. Is there any way to do this? Is there a switch to automaticly overwrite an existing file? Here is a copy of the code so far... ChDir "Z:\DIV4\Dept12\Dept12 Customer Service\Backup" ActiveWorkbook.SaveAs Filename:= _ "Z:\DIV4\Dept12\Dept12 Customer Service\Backup\!Dept12 CustServ Data Center.xls" _ , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ChDir "Z:\DIV4\Dept12\Dept12 Customer Service" ActiveWorkbook.SaveAs Filename:= _ "Z:\DIV4\Dept12\Dept12 Customer Service\!Dept12 CustServ Data Center.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Thanks Steve M. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Save As in a macro.
Hi
Before the SaveAs like add this Application.DisplayAlerts = False And after it Application.DisplayAlerts = true -- Regards Ron de Bruin http://www.rondebruin.nl "SMonczka" wrote in message om... I am trying to set up a macro to save a back up of a file before making changes to the file. When I try to back up the file by saving it over the existing file I get a prompt asking me if I want to overwrite the old file, wich I do. But I want the macro to do this automaticly without promting the user. Is there any way to do this? Is there a switch to automaticly overwrite an existing file? Here is a copy of the code so far... ChDir "Z:\DIV4\Dept12\Dept12 Customer Service\Backup" ActiveWorkbook.SaveAs Filename:= _ "Z:\DIV4\Dept12\Dept12 Customer Service\Backup\!Dept12 CustServ Data Center.xls" _ , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ChDir "Z:\DIV4\Dept12\Dept12 Customer Service" ActiveWorkbook.SaveAs Filename:= _ "Z:\DIV4\Dept12\Dept12 Customer Service\!Dept12 CustServ Data Center.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Thanks Steve M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Insert Current Date into cell - Macro to "Save As" | Excel Worksheet Functions | |||
macro to save as | Excel Discussion (Misc queries) | |||
MACRO SAVE HELP | Excel Worksheet Functions | |||
Macro to Save without the Save Message | Excel Discussion (Misc queries) | |||
Prompted to save changes after macro save - why? | Excel Programming |