Auto Macros

23.08.2021

By giving the macro a specific name, you can run it automatically when you carry out certain operations (e.g. launching FlexPro or opening a database). FlexPro recognizes the following names as auto macros:

Macro Name

Execution

AutoExec

When launching FlexPro or loading a template database

AutoNew

When creating a new database

AutoOpen

When opening an existing database

AutoClose

When closing a database

AutoExit

When exiting FlexPro or closing a template database

Auto macros are recognized in code modules if these contain a procedure that is named after the auto macro. Just like all other macros, auto macros can be saved in the personal template database or in a project database.

In case of a naming conflict (i.e. several auto macros have the same name), an auto macro in the active project database takes precedence over a macro of the same name in the personal template database.

Remarks   If you hold down the SHIFT key, auto macros are not executed. If, for example, you are creating a new database and the personal template database contains an AutoNew macro, you can prevent this AutoNew macro from being executed by clicking on File > New while holding down the SHIFT key until the new database is displayed.

Share article or send as email:

You might be interested in these articles