Datasheet
Delete a
Macro
Y
ou can delete macros you no longer need by
clicking the Delete button in the Macro dialog box.
Because the Macro dialog box only displays
macros in open workbooks, the workbook that contains
the macro must be open before you can delete it.
The Personal Macro Workbook stores macros you want to
make available to all workbooks. Excel creates the
Personal Macro Workbook when you choose to store your
first macro in it. After Excel creates the Personal Macro
Workbook, the workbook opens as a hidden file every
time you open Excel. To learn more about storing macros
in the Personal Macro Workbook, see the section,
“Record a Macro.”
If your macro is in a hidden workbook such as the
Personal Macro Workbook, you must unhide the
workbook before you can delete the macro. If you try to
delete a macro from the Personal Macro Workbook prior
to unhiding it, Excel displays the following message:
“Cannot edit a macro on a hidden workbook, Unhide the
workbook using the Unhide command.” You can unhide
the Personal Macro Workbook and other hidden
workbooks by executing the Unhide command on the
View tab.
If you unhide the Personal Macro Workbook, make sure
you hide it again using the Hide command on the View
tab after you delete the macros. Hiding the workbook
prevents you from making inadvertent changes to it.
You cannot undo the deletion process, but if you delete a
macro by mistake, you can close the workbook without
saving. Of course, if you close without saving, you will
lose all of the work you have done since saving. Your
only other alternative is to re-create the macro.
UNHIDE A WORKBOOK
1 Click the View tab.
2 Click Unhide in the Window group.
PERSONAL.XLSB
1
2
3
4
Delete a Macro
18
The Unhide dialog box appears.
3 Click the workbook you want to unhide.
4 Click OK.
Excel unhides the workbook.
04_132302 ch01.qxp 7/27/07 9:20 PM Page 18