ActiveWorkbook.SaveAs Problem

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
 
N

Norman Jones

Hi SowBelly,

Try:

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

SowBelly

Norman:

Worked great!

SowBelly

Hi SowBelly,

Try:

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

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

Top