View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SMonczka SMonczka is offline
external usenet poster
 
Posts: 33
Default 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.