Saveas where file already exists

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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]
 
Precede with

Application.Display = False

and reset to True afterwards.


--

HTH

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

Application.DisplayAlerts = False


--

HTH

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