To assign keyboard shortcuts to macros within PowerPoint files, your
macros need to meet the following 3 requirements:
- The macro needs to be in a Code Module (not a UserForm or a Class Module).
- The macro should be taking in no parameters.
- The macro signature should be as follows:
Sub YourMacroName()
'
' Your macro code.
'
End Sub
or
Public Sub YourMacroName()
'
' Your macro code.
'
End Sub
Shortcut Manager for PowerPoint automatically discovers macros that meet
the above 3 conditions. To assign keyboard shortcuts to the macros, follow
these steps:
PowerPoint 2019, 2016, 2013, 2010, 2007 |
PowerPoint 2003, 2002, 2000 |
- Open the PowerPoint file.
- Select Home tab, click Customize button in
the Keyboard Shortcuts group to bring up the Customize
Shortcuts dialog box.
- In the Customize Shortcuts dialog, locate and select the
Macros category. The macros in your PowerPoint file will
be listed in the Commands list. Locate and select the macro
for which you wish to assign a keyboard shortcut.
- In the Assign shortcut to command
box, press the key combination that you wish to assign to
the selected command.
- Click OK.
|
- Open the PowerPoint file.
- Select Tools | Customize Shortcuts... menu
item to bring up the Customize Shortcuts dialog box.
- In the Customize Shortcuts dialog, locate and select the
Macros category. The macros in your PowerPoint file will
be listed in the Commands list. Locate and select the macro
for which you wish to assign a keyboard shortcut.
- In the Assign shortcut to command
box, press the key combination that you wish to assign to
the selected command.
- Click OK.
|
When the assigned key combination is pressed, the corresponding macro
will be executed.