» 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
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:
- Rich Dad's Guide to Investing: What the Rich Invest in, That the Poor and the Middle Class Do Not!
- Analyzing Markets, Products, and Marketing Plans
- Lower Your Taxes - Big Time! : Wealth-Building, Tax Reduction Secrets from an IRS Insider
- H&R Block's Just Plain Smart(tm) Tax Planning Advisor: A year-round approach to lowering your taxes this year, next year and beyond
- Accounting and Financial Fundamentals for Nonfinancial Executives
- Special Edition Using Microsoft Outlook 2002
Disable and Enable Macro in Excel
Rajesh Posted on: 31-12-1969
I don't want to display disabl;e or enable Macro while opening excel work sheet. still i want to run the macro. i have written the macro through VB code

