how to save a file and overwrite existing file

  • Thread starter Thread starter Daniel M
  • Start date Start date
D

Daniel M

I have a macro where i want to save a file but there is an existing file with
that name already. how can i keep the dialog box from popping up and asking
if i want to save it. i have tried the following code but it doesnt work.
Thanks.

ActiveWorkbook.SaveAs Filename:= _
"\\Houston\manfdocs\Macros\RepairImporttest.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False, AccessMode:=xlNoChange,
ConflictResolution:=xlLocalSessionChanges
 
I have a macro where i want to save a file but there is an existing file with
that name already. how can i keep the dialog box from popping up and asking
if i want to save it. i have tried the following code but it doesnt work.
Thanks.

ActiveWorkbook.SaveAs Filename:= _
"\\Houston\manfdocs\Macros\RepairImporttest.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False, AccessMode:=xlNoChange,
ConflictResolution:=xlLocalSessionChanges

Does Application.DisplayAlerts = False help? Don't forget to turn it
back on.
 
Back
Top