Reputation: 11498
I'm playing with shortcuts for and ExcelDna add-in:
[ExcelCommand(ShortCut = "^H")]
public static void SetBorderM()
{
XlCall.Excel(XlCall.xlcAlert, "Boo!");
}
This binds CTRL+SHIFT+H.
But what is the full syntax for ShortCut?
I'm looking to bind the Numpad keys for example.
Upvotes: 1
Views: 792
Reputation: 16907
The Excel-DNA ShortCut indicators should be the same as for Application.OnKey
: https://msdn.microsoft.com/en-us/library/office/ff197461.aspx
For the Numpad keys, I think you can put the keycode in braces:
0 {96}
1 {97}
2 {98}
3 {99}
4 {100}
5 {101}
6 {102}
7 {103}
8 {104}
9 {105}
+ {107}
- {109}
Upvotes: 3