Sheet Properties: Triggers
On Triggers page you can specify actions, including macros, to be invoked on sheet events.
Not all actions can be invoked from the following event triggers.
Sheet Event Triggers
In this group you can set actions to trigger on change of active sheet. Pressing the Add Action(s) button for either event brings you to the Actions page. On this page you can add an action to the event. Choose the action Run Macro to assign an existing macro name or type any name for which you later can create a macro in the Edit Module dialog. When an action has been assigned to the event, the button changes to Edit Action and you can change the action for the event. The following Sheet Event Triggers are configurable:
OnActivateSheet
The action will be executed each time the sheet is activated.
OnLeaveSheet
The action will be executed each time the sheet is deactivated.