Running a Macro in Microsoft Excel
Once you have recorded a macro, you can play back the keystrokes and command selections anywhere in the workbook. Many of the macros you record will run so quickly that they seem to work almost instantaneously. You select the macro you want to run in the Macro dialog box, shown in Figure 2-5. If you entered a description when you created a macro, the description appears at the bottom of the dialog box when you select the macro.
For more details of Excel Macro and VBA training classes in Los Angeles call us on 888.815.0604. Our classes are hands-on and taught by live certified trainers.
Steps to Run a Macro
To run a macro:
- In the Code group on the Developer tab, click the Macros button.
- In the Macro dialog box, in the Macro Name list box, select the macro you want to run.
- Choose Run.
Recording a Macro in the Personal Macro Workbook
By default, when you record a macro, the macro is stored in the current workbook. You can only use that macro when the workbook it is stored in is open. If you want a particular macro to be available whenever you open Excel, you can record the macro in the Personal Macro Workbook. The Personal Macro Workbook opens when you start Excel and remains open unless you manually close it.
Also see Recording a Macro
To record a macro in the Personal Macro Workbook:
- In the Code group on the Developer tab, click the Record Macro button.
- The macro dialog box opens
- In the Record Macro dialog box, enter a name and description for the macro.
- From the Store macro in drop-down list, select Personal Macro Workbook.
- Choose OK.
- Choose commands or enter data you want to store in the macro.
- Click the Stop Recording button in the Code group to stop the recording.
Also see How to Edit a Macro.