Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Replace file without being prompted to save

I use this code to save over a file with new info;

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

I get prompted that the file already exists and do I want to replace the
file by saving anyway. I do want to save anyway each and every time. What
code can I include to automatically save and replace the file without being
prompted?

Your help is greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Replace file without being prompted to save

You want to temporarily suspend alerts as follows...

Application.displayalerts = false

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Application.displayAlerts = true
--
HTH...

Jim Thomlinson


"SJW_OST" wrote:

I use this code to save over a file with new info;

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

I get prompted that the file already exists and do I want to replace the
file by saving anyway. I do want to save anyway each and every time. What
code can I include to automatically save and replace the file without being
prompted?

Your help is greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Replace file without being prompted to save

You guys are AWSOME!!!
Thank you, that works perfectly!

"Jim Thomlinson" wrote:

You want to temporarily suspend alerts as follows...

Application.displayalerts = false

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Application.displayAlerts = true
--
HTH...

Jim Thomlinson


"SJW_OST" wrote:

I use this code to save over a file with new info;

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

I get prompted that the file already exists and do I want to replace the
file by saving anyway. I do want to save anyway each and every time. What
code can I include to automatically save and replace the file without being
prompted?

Your help is greatly appreciated.

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
Excel - No Longer Prompted to Save When I Close File HammerD Excel Discussion (Misc queries) 1 May 8th 09 06:05 PM
Upon exiting Excel I am not prompted to SAVE the file ebbs Excel Discussion (Misc queries) 4 September 25th 08 06:08 AM
Why am I prompted to save a file when nothing has changed? SimonD Excel Discussion (Misc queries) 2 April 29th 05 02:21 PM
Save without prompted and activate external file mok707 Excel Programming 1 August 19th 04 05:57 AM
save w/o prompted and activate a file mok707 Excel Programming 1 August 19th 04 05:53 AM


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

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"