how to save a file and overwrite existing file

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
 
D

dbKemp

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Simplify save code 11
SaveAs to existing file 5
Hiding an Excel file using VBA 1
Recording a 'Save As...' 4
Save with ref. to cell A1 2
Accept Overwrite Automatically 1
Save As File Format 1
Save as marco 3

Top