Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Replace Existing File

I am using the following code to save the active workbook:

ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

How can I get it to select Yes if prompted to Replace the Existing File?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Replace Existing File

application.displayalerts = false
ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
application.displayalerts = true

Will save without a prompt.

Lynn wrote:

I am using the following code to save the active workbook:

ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

How can I get it to select Yes if prompted to Replace the Existing File?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Replace Existing File

Thanks Dave!

"Dave Peterson" wrote:

application.displayalerts = false
ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
application.displayalerts = true

Will save without a prompt.

Lynn wrote:

I am using the following code to save the active workbook:

ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

How can I get it to select Yes if prompted to Replace the Existing File?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Replace Existing File



"Dave Peterson" wrote:

application.displayalerts = false
ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
application.displayalerts = true

Will save without a prompt.

Lynn wrote:

I am using the following code to save the active workbook:

ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

How can I get it to select Yes if prompted to Replace the Existing File?


--

Dave Peterson


Hi Dave,

i am using this syntax to save activeworkbook with a new filename, but file
doesn't seem to save! Can't find it anywhere... what on earth am I doing ?

Matilda
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Replace Existing File

Add one more line after the save:

msgbox activeworkbook.fullname

Maybe it'll help you notice where you saved it. Although, you should be able to
see that drive/path/name in your code (unless you changed the code).

Matilda wrote:

"Dave Peterson" wrote:

application.displayalerts = false
ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
application.displayalerts = true

Will save without a prompt.

Lynn wrote:

I am using the following code to save the active workbook:

ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

How can I get it to select Yes if prompted to Replace the Existing File?


--

Dave Peterson


Hi Dave,

i am using this syntax to save activeworkbook with a new filename, but file
doesn't seem to save! Can't find it anywhere... what on earth am I doing ?

Matilda


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Replace Existing File

Thanks! Can see it now!
"Dave Peterson" wrote:

Add one more line after the save:

msgbox activeworkbook.fullname

Maybe it'll help you notice where you saved it. Although, you should be able to
see that drive/path/name in your code (unless you changed the code).

Matilda wrote:

"Dave Peterson" wrote:

application.displayalerts = false
ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"
application.displayalerts = true

Will save without a prompt.

Lynn wrote:

I am using the following code to save the active workbook:

ActiveWorkbook.SaveAs Filename:="C:\MyWorkbooks\TempFile.xls"

How can I get it to select Yes if prompted to Replace the Existing File?

--

Dave Peterson


Hi Dave,

i am using this syntax to save activeworkbook with a new filename, but file
doesn't seem to save! Can't find it anywhere... what on earth am I doing ?

Matilda


--

Dave Peterson

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
SaveAs macro: How do I specify "Replace existing file?" [email protected] Excel Programming 1 May 24th 05 02:36 AM
Do you want to replace existing file? Tony Excel Programming 3 July 15th 04 11:21 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
How do you replace an existing file, saying "yes" in a macro? Chris Excel Programming 0 November 19th 03 03:25 PM
Automatically replace existing file on save ronber[_2_] Excel Programming 1 September 25th 03 10:05 PM


All times are GMT +1. The time now is 09:10 PM.

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

About Us

"It's about Microsoft Excel"