Saveas where file already exists

G

Guest

I am trying to "saveas" the active workbook and would prefer to have the
system enter throught he prompt that the file exists and do i want to replace
it? In this particular case, I always with to replace it. My current is as
follows:

ActiveWorkbook.SaveAs (conSaveFilePath & strRespFileName)

conSaveFilePath is a file path constant and strRespFileName is a variable
containing the file name. Or...should i be dealing with this differently?

thanks
 
J

Jake Marx

Hi faberk,

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs (conSaveFilePath & strRespFileName)
Application.DisplayAlerts = True

This will effectively answer "yes" to the overwrite prompt.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
B

Bob Phillips

Precede with

Application.Display = False

and reset to True afterwards.


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

Spellchecker got me

Application.DisplayAlerts = False


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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