1.11 FAQs
No. You can also create a macro by writing source code directly in a VBA module. Later chapters in this book teach you how to create a macro without recording.
Yes, although you can only rename a macro by editing the macro source code directly, as described in the next chapter. Renaming a macro, however, might cause some minor problems. If your macro is assigned to a shortcut key, or to buttons or graphic objects on a worksheet, these custom controls will still try to run the macro using its old name. If you rename a macro, you will have to reassign its shortcut key and each custom control to the new macro name. For this reason, it is much better to spend a little time carefully choosing a macro's name, rather than count on renaming the macro later.
Yes. Use Excel's Macro dialog to assign a shortcut key to a macro. First, open the Macro dialog from the Developer ribbon. Next, select the macro you want to assign a shortcut key to in the Macro Name list, and then click the Options button to display Excel's Macro Options dialog. Type the shortcut key you want for your macro, and then click OK.
Yes. You can change or remove shortcut key assignments in Excel by displaying the Macro Options dialog for the macro whose shortcut key you want to change or remove, and then deleting the entry in the Shortcut Key text box.
Want to try our built-in assessments?
Use the Request Full Access button to gain access to this assessment.