Macro renaming

G

G Teachman

When creating a macro I don't always give it a descriptive name. I would
like to know how to rename the macro.

THanks,
 
J

Jay Freedman

Press Alt+F8 to open the Macros dialog. Select the macro you want, and click
the Edit button to open the macro editor. The first line of the macro
contains its name, between the keyword "Sub" and a pair of parentheses.
Change the name there, and then click the Save button.

For example, to rename Macro1 as MyFirstMacro, change the line

Sub Macro1()

to

Sub MyFirstMacro()

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
F

Fumei2 via OfficeKB.com

Just be aware that if you had assigned a keyboard shortcut to a procedure
(macro) - say Alt-6 for Macro1 - that shortcut will NOT be carried over to
the renamed procedure. You would have to manually reassign the shortcut key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top