Tools - Macro - Application Events - View Code

Ribbon bar. Select the Tools tab. In the Tools group, click Macro and from the ApplicationEvents submenu, select View Code to display the Document Events window, in which you enter code to change the default behavior of application-level events.

Classic menus. From the Tools - Macro - Application Events submenu, select View Code to display the Document Events window, in which you enter code to change the default behavior of application-level events.

Application-level events allow you to customize the behavior of all documents of a certain type (such as all spreadsheets, or all workbooks, or all reports, etc.). See STATISTICA Events and Application-Level Events Example for further details.