Is This Content Helpful?
How can we make this better? Please provide as much detail as possible.
An accelerator key is the mapping of a particular keyboard sequence to execute a command.
Code in the Project's ThisDocument code module will only run in the current map document. If you want to store the code in all your map documents, open the Normal.mxt ThisDocument code module instead.
Public Sub myShortcut()
Dim mAccTab As IAcceleratorTable
Set mAccTab = ThisDocument.Accelerators
Dim newAcc As Boolean
newAcc = mAccTab.Add("Project.ThisDocument.mymacro", vbKeyZ, False, True, False)
Public Sub mymacro()
MsgBox "This test worked"