Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro: Overwrite existing without prompt. 2

Status
Not open for further replies.

endoflux

Technical User
Aug 6, 2001
227
US
Gentlemen--

I'm trying to have my worksheet save changes and overwrite an existing file without prompting...

I got a lead from another thread to look at the DisplayAlerts Property of the Excel.Application object for this, and it got me started...

Setting DisplayAlerts = False will turn off notification, but everything I can find says that the Overwrite alert will have a default of "No"-- nothing explains how to change this to "Yes".

Question: Anyone have an idea how I can change that default globally (IE, I don't want to just set it for my local machine, but force it for whomever is using the sheet)?
 
...however, when I tested out just the DisplayAlerts = False, it saved my changes without prompting <scratching head>

This may be one of those where you say "Hey...it works...quit while you're ahead!
 
A note:
changing DisplayAlerts = False is a permanent change in Excel. You must change it back to True at the end of your code if you normally want alerts displayed.
You can manually change the DisplayAlerts setting by showing the office assitant and right clicking on it, and selecting "Options".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top