Saving a file in a macro

  • Thread starter Thread starter Eric Dreshfield
  • Start date Start date
E

Eric Dreshfield

I am using the following statement to save a file:

ActiveSheet.SaveAs FileName:="c:\imports\paycheck.CSV",
FileFormat:=xlCSV, CreateBackup:=False


If the file already exists I get prompted with the
overwrite box...can I do something in the macro to
automatically overwrite the existing file ?
 
Eric,

Use
Application.DisplayAlerts = False
*your code*
Application.DisplayAlerts = True
 
Steve,

Thanks !!

Eric
-----Original Message-----
Eric,

Use
Application.DisplayAlerts = False
*your code*
Application.DisplayAlerts = True

--
sb



.
 

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

Back
Top