Assign a keyboard shortcut in VBA?

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have a simple piece of code that I want a keyboard shortcut for.

The code was written, rather than recorded, and now I want to assign ti
to Ctrl+M but don't know how to do it in VBA?

Any help greatly appreciated....Jason
 
Sub Macro1()
Application.MacroOptions Macro:="hello", Description:="", ShortcutKey:="m"
End Sub
 
Back
Top