Microsoft Office Tutorials and References
In Depth Information
Deleting a Macro
Deleting a Macro
If you want to delete a macro, just return to the Macro dialog box, click the macro you
want to remove, and click Delete (see Figure 11–14).
Figure 11–14. Where to delete a macro
Once you click Delete, a cautionary prompt
appears (see Figure 11–15), something
that often happens when you’re about to
delete an important Excel object. Click Yes
if you’re sure you want to delete the
macro. But click No here, because we want
do something else with the Logo macro—
namely, edit it.
Figure 11–15. The prompt for deleting a macro
Editing a Macro by Tweaking It in VBA
What if your macro contains a mistake, or you just want to change it? What if, for
example, you really wanted the Gidget’s Widgets logo to exhibit 10-point text instead of
its current 14-point size?
The simplest way to modify the macro would be record it over again and delete the
original. That might work if your macros are likely to be brief, but that scenario is still a
bit bothersome—and once a macro gets a bit lengthier, the prospect of a do-over is less
appealing still, in part because in the process of rerecording the macro you might very
well make another mistake.
Is there an alternative? Yes—you can edit the macro in VBA.
Search JabSto ::

Custom Search