B
Beverly76
I am trying to write a macro that opens a file, saves it under a separate
file name, then opens a different file and saves that, etc. I would like to
avoid Excel asking me if I want to overwrite the file within the macro. Is
there a way I can either turn off warnings, or more preferably indicate to
overwrite the file when in the code itself to avoid clicking "Yes" ten times.
This is what the editor has as the recorded code.
ChDir "S:\Test\Macros"
Workbooks.Open Filename:="S:\Test\Macros\MacroA.xls"
ChDir "S:\Test\Copies"
ActiveWorkbook.SaveAs Filename:="S:\Test\Copies\FileA.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close
file name, then opens a different file and saves that, etc. I would like to
avoid Excel asking me if I want to overwrite the file within the macro. Is
there a way I can either turn off warnings, or more preferably indicate to
overwrite the file when in the code itself to avoid clicking "Yes" ten times.
This is what the editor has as the recorded code.
ChDir "S:\Test\Macros"
Workbooks.Open Filename:="S:\Test\Macros\MacroA.xls"
ChDir "S:\Test\Copies"
ActiveWorkbook.SaveAs Filename:="S:\Test\Copies\FileA.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close