Select the product you need help with
PRJ: Auto_Open and Auto_Close MacrosArticle ID: 126105 - View products that this article applies to. This article was previously published under Q126105 On This PageSummary
In Microsoft Project, when you use the Auto_Open or Auto_Close Visual
Basic, Applications Edition, macro names, the macro will run either when a
file is opened or when it is closed, respectively.
This behaviour does not work for embedded projects, or project files linked into other applications. Auto_Open/Auto_Close will not function in these cases. More informationThe following table shows the behavior of an Auto_Open or Auto_Close macro depending on whether the macro is located in a Microsoft Project MPP/MPT file or in GLOBAL.MPT. Note that Consolidated MPP is the same as a Master plan; the terminology changed with the release of 2002. Auto_Open MacroType of File Opening Macro Location Auto Macro Runs From ---------------------------------------------------------------------- Normal MPP/MPT GLOBAL.MPT GLOBAL.MPT Normal MPP/MPT MPP or MPT MPP/MPT Normal MPP/MPT GLOBAL.MPT and MPP/MPT MPP/MPT Foreign (MPX, CSV, GLOBAL.MPT GLOBAL.MPT and so on) 3.0 MPV or MPC GLOBAL.MPT Does Not Run Consolidated MPP GLOBAL.MPT Does Not Run Consolidated MPP MPP Does Not Run Consolidated MPP GLOBAL.MPT & MPP Neither Macro Runs Auto_Close MacroType of File Closing Macro Location Auto Macro Runs From ---------------------------------------------------------------------- Normal MPP/MPT GLOBAL.MPT GLOBAL.MPT Normal MPP/MPT MPP or MPT MPP/MPT Normal MPP/MPT GLOBAL.MPT and MPP/MPT MPP/MPT Foreign (MPX, CSV, GLOBAL.MPT GLOBAL.MPT and so on) 3.0 MPV or MPC GLOBAL.MPT GLOBAL.MPT Consolidated MPP GLOBAL.MPT GLOBAL.MPT Consolidated MPP MPP MPP Consolidated MPP GLOBAL.MPT & MPP MPP In addition, if an Auto macro exists within an MPP or MPT file, the macros will not be run when you open or close a different file. References
For more information about Creating A Sub Procedure That Runs
Automatically, choose Contents from the Help menu, choose Visual Basic
Reference, choose the Search button, and type:
Creating PropertiesArticle ID: 126105 - Last Review: April 29, 2013 - Revision: 6.0 Applies to
| Article Translations
|


Back to the top








