Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Replace file without being prompted to save

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SJW_OST - 26 May 2008 18:33 GMT
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.
Jim Thomlinson - 26 May 2008 18:39 GMT
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
Signature

HTH...

Jim Thomlinson

> I use this code to save over a file with new info;
>
[quoted text clipped - 10 lines]
>
> Your help is greatly appreciated.
SJW_OST - 26 May 2008 18:45 GMT
You guys are AWSOME!!!
Thank you, that works perfectly!

> You want to temporarily suspend alerts as follows...
>
[quoted text clipped - 22 lines]
> >
> > Your help is greatly appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.