Add shortcut Custom Ribbon

46 views
Skip to first unread message

Nam Vũ

unread,
Apr 23, 2023, 8:01:32 AM4/23/23
to Excel-DNA
How can I add a shortcut to a button on the Custom Ribbon. My Custom Ribbon uses Excel DNA. I tried to try using the code XlCall.Excel(xlcOnkey, shortcut, void_name) but it doesn't work. I also set [ExcelComand] but still nothing happens

Govert van Drimmelen

unread,
Apr 23, 2023, 3:59:08 PM4/23/23
to Excel-DNA
To override the auto-assigned keyboard bindings in your ribbon, you set the "keytip" property.
This doesn't give you a global shortcut key though, just a way to navigate through the ribbon with the keyboard.

To make a global shortcut key, you can set up a separate macro (that might call common code to your ribbon handler, but there is no easy link) like this:

-Govert


Reply all
Reply to author
Forward
0 new messages