Terminating the macro

Whether or not there are next screens, the macro runtime terminates the macro when it finishes processing a macro screen that is marked as an exit screen.

In the example scenario Screen2 is marked as an exit screen (see Contents of macro screen Screen2).

The exit screen setting, an attribute of the <screen> element, exists for exactly this purpose, to mark macro screens that terminate the macro.

When a macro is recorded, the Macro object, by default, marks the last recorded macro screen as an exit screen. After recording is complete, you can mark (or unmark) any macro screen as an exit screen, and there can be multiple exit screens.

Exit screens are described in more detail in Exit screens.