» Turn off warning messages using VBA in Microsoft Excel
VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
CATEGORY - General Topics in VBA
VERSION - All Microsoft Excel Versions
Sometimes the application displays a messagebox asking if the user wants to continue, if he/she wants to save a file before closing, or want some other verification from the user.
These messages can be turned off by using this command in a macro :
Application.DisplayAlerts = FalseThe warningmessages will remain turned off until you enable them again with this command:
Application.DisplayAlerts = TrueIf you just want to close a workbook without the user being prompted for any confirmations
about saving the workbook you can simply do this:
ActiveWorkbook.Close False ' closes the active workbook without saving any changes ActiveWorkbook.Close True ' closes the active workbook and saves any changes
Book Store:
Recommended Books:
- Keys to Reading an Annual Report (Barron's Business Keys)
- How to Read A Financial Report
- Quantitative Methods in Derivatives Pricing: An Introduction to Computational Finance
- Who Moved My Cheese? An Amazing Way to Deal with Change in Your Work and in Your Life
- Absolute Beginner's Guide to Microsoft Excel 2002
- The 22 Immutable Laws of Marketing : Exposed and Explained by the World's Two
No comments have been submitted.

