» Prevent that an automacro/eventmacro executes 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 - Events in VBA
VERSION - All Microsoft Excel Versions
down when you open the file.
If the workbook is password protected, remember to hold the Shift-key down after you have entered the password.
An Auto_Open-macro will not run automatically when you open a workbook from a macro. You will have to remember
to set the method RunAutoMacros to True.
You can prevent an Auto_Close-macro to run by holding the Shift-key down when you close the workbook..
The same applies to all the other auto-macros, hold the Shift-key down to prevent them from running.
In Excel 97 and later, events are used to run macros. Excel 97 and later will also recognize and run the older
auto-macros if they exist. The eventmacros will run before the automacros, e.g. the Workbook_Open eventmacro
will run before the Auto_Open-macro.
In Excel 97 and later you can disable the eventmacros by adding this line to your code:
Application.EnableEvents = FalseRemember to set the property back to True so that event macros are enabled again when you are finished.
Book Store:
Recommended Books:
- The Fall of Advertising and the Rise of PR
- F1 Get the Most out of Excel! The Ultimate Excel tip Help Guide
- Microsoft Word Version 2002 Inside Out
- MP Managerial Accounting w/ Topic Tackler, Net Tutor, & PowerWeb
- The One Page Business Plan: Start With a Vision, Build a Company!
- The Ernst & Young Business Plan Guide
excellent info. but ???
hitesh Posted on: 31-12-1969
I want to know more bout auto_open macro . Its not running in my excel20000 version, I want to know whether it works in excel2000 or there is a bug in my version.


