Datasheet
12
1
2
3
4
The Macro dialog box appears.
4 If your macro does not appear
in the Macro dialog box, click
the down arrow and then
select the workbook that
contains your macro.
1 Select the cells where you
want to apply your macro.
2 Click the Developer tab.
Note: See the task “Introducing
Macros” to learn how to display the
Developer tab.
3 Click Macros.
Alternatively, press Alt+F8.
Run a Macro
M
acros enable you to quickly perform tasks that
would normally take multiple steps. When you
run a macro, Excel replays the steps you
recorded when you created the macro. You can run any
macro located in any workbook as long as the workbook
in which the macro is located is open. To run a macro,
you can press the shortcut key you assigned when you
created the macro, or you can select the macro from the
Macro dialog box.
When you create a macro, you can choose to store it in
one of three locations: the current workbook, a new
workbook, or the Personal Macro Workbook. By default,
the Macro dialog box lists all the macros in open
workbooks. If a macro is stored in the Personal Macro
Workbook, the macro opens as a hidden file each time
you open a file. By default, the files in the Personal
Macro Workbook always appear in the Macro dialog box.
You can use the Macros In field to limit the number of
macros listed in the Macro dialog box. To see the macros
in any open workbook, including the Personal Macro
Workbook, select All Open Workbooks from the Macros
In drop-down list. To see the macros from a specific
workbook, select the name of the workbook from the
Macros In drop-down list. To see global macros stored in
the Personal Macro Workbook, select PERSONAL.XLSB
from the Macros In drop-down list.
To run macros from another workbook, the macro must
be from a signed source or you must enable the macros.
You can set the security setting for macros. See the section
“Set Macro Security” to learn more about macro security.
Run a
Macro
03_591598-ch01.indd 1203_591598-ch01.indd 12 6/11/10 1:41 PM6/11/10 1:41 PM