Share via

How do I rename a macro?

Anonymous
2012-06-22T03:27:28+00:00

I have created and saved a macro and now want to change the macro name without having to recreate the macro under a new name.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2012-06-22T03:54:49+00:00

    If you have developer tab enables then click on Macros and change the name in the Macro Name box...

    You can also press ALT-F11 to open the VBE editor, locate your macro and just change the name...

    eg. if you see

    sub oldName()

    change it to

    sub newName()

    6 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-06-25T23:56:25+00:00

    Thanks for the quick response. I was not able to change the name in the Macro Name box. There did not seem to be an option to edit the name. However, when I took your second suggestion, I was able to change the name there. I did notice that the macro name was also displayed in green below it. What is the significance of that. It did not seem to matter if I changed that name or not.

    0 comments No comments