Solved

Excel SaveFile YesNoCanel box

Posted on 2011-09-16
5
248 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

789 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