Suppress error message with saveas

  • Thread starter Thread starter lisamariechemistry
  • Start date Start date
L

lisamariechemistry

In one particular section of my module, I'd like to perform a
workbook.saveas that will:

1.) suppress the "file already exists" error message (I can do that
with OnError..) 2.) always go ahead and save over the existing file
(how?)

(I saw someone had asked about a related situation, using On Error
GoTo 0 to move on to the next task instead of overwriting the existing
file...close but doesn't quite get me there) Help?
 
Maybe this:

Application.AlertBeforeOverwriting = False
Application.AlertBeforeOverwriting = True

HTH,
Paul
 
You can use something like:

Application.displayalerts = false
'your code to save the workbook here
application.displayalerts = true

to suppress that warning dialog.
 
Hi,

Try it this way

Application.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\sample.xls"
Application.DisplayAlerts = True
 
Thank you, thank you, and thank you!

You can use something like:

Application.displayalerts = false
'your code to save the workbook here
application.displayalerts = true

to suppress that warning dialog.
 
Back
Top