Solved

Excel SaveFile YesNoCanel box

Posted on 2011-09-16
5
247 Views
Last Modified: 2012-06-22
In VBA how do I force answer Yes each time I want to save a file.  I have a file that I save to multiple locations and I want it to not need that question answered each time.  Can this be done?  -R-
FileSaveYesNoCancel.png
0
Comment
Question by:RWayneH
  • 2
  • 2
5 Comments
 
LVL 6

Assisted Solution

by:effes
effes earned 150 total points
ID: 36551768
Have a look at his: http://www.vbforums.com/showthread.php?t=528826

Hope that helps.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 350 total points
ID: 36551879
In VBA, add the following line of code early in the macro:

Application.DisplayAlerts = False

This will disable overwrite messages such as above.

You also need turn this back on before exit.
Application.DisplayAlerts = True
0
 

Author Comment

by:RWayneH
ID: 36551922
Thanks!!  Will this work when deleting sheet tabs too?  -R-
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 36551969
RE: Deleting sheet tabs...yes, it will.

That's why you have to be careful with this function.  If it remains FALSE, you can bypass messages during your Excel session that might prevent accidental overwriting/deletion.
0
 

Author Closing Comment

by:RWayneH
ID: 36552829
Thanks for the help. -R-
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question