Saving file via Macro without being prompted

D

David

I have an excel worksheet where I want to save it's pages without being
prompted "X file already exists in this location, do you want to replace
it?" I want to replace these files without being prompted. The snipet of
the current VB code to save, currrently looks like this:

Sheets("1Week-2004").Select
ActiveWorkbook.SaveAs Filename:="C:\My
Documents\Baseball\1Week-2004.txt", _
FileFormat:=xlText, CreateBackup:=False

Thanks Much!
David

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Business Software Galore!
Free Excel Forum http://www.ozgrid.com/forum ***
 
F

Frank Kabel

Hi
try
application.displayalerts=false
Sheets("1Week-2004").Select
ActiveWorkbook.SaveAs Filename:="C:\My
Documents\Baseball\1Week-2004.txt", _
FileFormat:=xlText, CreateBackup:=False
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