Assign a keyboard shortcut in VBA?

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
 
G

Gary''s Student

Sub Macro1()
Application.MacroOptions Macro:="hello", Description:="", ShortcutKey:="m"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top