VBA: Onkey vs. MacroOptions ShortcutKey

Engineer Joe

Well-known Member
Joined
Jun 10, 2005
Messages
549
I recently changed companies and couldn't take my Addin with me, but in my previous Addin, I had nearly every letter on the keyboard associated with a CNTRL+SHFT+<Shortcut Key>. I've rebuilt the most important of the shortcut keys and obviously, having used them thousands of times, it was easy to do from memory. However, I've noticed certain shortcut keys don't work anymore for one reason or another. The macro itself executes flawlessly, but the shortcut key combination doesn't call it. A good example is CNTRL+SHFT+P. In my new version of Excel (2016), it now pulls up the "Format Cells" menu, which is endlessly frustrating. Which leads me to my question.

Is there a way to circumvent/override the new default shortcut combos while still using the Macrooptions Shortcutkey method? If not, should I resort to using Onkey, and will that even work? If I do resort to the Onkey method, are there any pitfalls/disadvantages to using that method? My plan is just to change them out in the very same locations they exist now: In the WB_Open and WB_Close events of my Addin.

Any input or advise is welcome.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,222,689
Messages
6,167,647
Members
452,127
Latest member
jayneecm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top