Tools - Analysis Bar - Create Macro

Ribbon bar. Select the Tools tab. In the Tools group, click Analysis Bar and from the menu, select Create Macro to display the New Macro dialog box.

Classic menus. From the Tools - Analysis Bar submenu, select Create Macro to display the New Macro dialog box.

Use these options to specify a name for a new macro based on the current analysis. When you run an analytic procedure (from the Statistics tab/menu) or create a graph (from the Graphs tab/menu), the Visual Basic code corresponding to all design specifications as well as output options that you select are recorded in the background. Thus, when you click the OK button in the New Macro dialog box, the resulting macro window displays the appropriate code to recreate the current analysis.