Thursday, December 1, 2011

Excel 2010 VBA to assign a shortcut key

Application.OnKey "^j", "subroutineToRun"

This runs the subroutine named subroutineToRun when CTRL+j is pressed.
The macros must be run once before the shortcut will work.

2 comments: