ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to save a file and overwrite existing file (https://www.excelbanter.com/excel-programming/404565-how-save-file-overwrite-existing-file.html)

Daniel M

how to save a file and overwrite existing file
 
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.xl s", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False, AccessMode:=xlNoChange,
ConflictResolution:=xlLocalSessionChanges


dbKemp

how to save a file and overwrite existing file
 
On Jan 18, 2:24 pm, Daniel M
wrote:
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.xl s", 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.


All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com