ActiveWorkbook.SaveAs Problem

  • Thread starter Thread starter SowBelly
  • Start date Start date
S

SowBelly

Hello:

I am using ActiveWorkbook.SaveAs "filepath\filename" and it is working
just fine the first time around. Every time after that I get the Excel
MsgBox that informs me that the filename already exists and do I want
to overwrite. Since I have about 1300 files to do this with, I would
prefer to be able to force the ActiveWorkbook.SaveAs with no MsgBox.
Is it possible or do i have to test for the file first and delete it
before doing the SaveAs?

"Pigs can't be humans, but humans can be Pigs!"

Eating at the trough of life.

Oink!

SowBelly
 
Hi SowBelly,

Try:

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs " "filepath\filename""
Application.DisplayAlerts = True
 
Norman:

Worked great!

SowBelly

Hi SowBelly,

Try:

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs " "filepath\filename""
Application.DisplayAlerts = True
 
Back
Top