Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Saveas where file already exists

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Saveas where file already exists

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]


faberk wrote:
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Saveas where file already exists

Precede with

Application.Display = False

and reset to True afterwards.


--

HTH

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


"faberk" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Saveas where file already exists

Spellchecker got me

Application.DisplayAlerts = False


--

HTH

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


"Bob Phillips" wrote in message
...
Precede with

Application.Display = False

and reset to True afterwards.


--

HTH

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


"faberk" wrote in message
...
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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Saveas where file already exists

Thank you gentlemen!

"faberk" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
IF File Exists [email protected] Excel Programming 1 November 22nd 04 07:24 PM
File already exists Michael Malinsky[_3_] Excel Programming 0 June 28th 04 08:02 PM
SaveAs command when a file already exists? debartsa Excel Programming 2 January 5th 04 04:12 PM
the file already exists - do you want to replace the existing file? Paul James[_3_] Excel Programming 4 December 12th 03 02:50 AM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"