In response to the question of :
I am wondering if the VBE can be directly programmed to solve this problem?
The answer unfortunately is negative.
The only way to modify the behavior is by using
add-ins
whose capabilities are summed up by Microsoft as :
- A startup module to trap the opening and closing of the add-in.
- Some code to add our menu items to the commandbars on opening and remove them when closing
- For the VBE, a class mosule to handle the menu items "Click" events
- Some code to perform your menu's actions.
Specifically, intercepting hotkeys is not in the list.
The answer by Eliyahu is then still correct, and AutoHotKey (or AutoIt)
is still the only solution.
Not really. Might be possible using some third party software to create a new hot key – Eric F – 2015-02-18T20:38:21.737
Application.Onkey
method will do this for the application, but I don't think it works for the editor.. – Raystafarian – 2015-03-02T19:05:44.793Related: http://stackoverflow.com/questions/7497347/is-there-a-way-to-disable-access-2007s-code-editors-ctrly-shortcut-key
– Eliyahu – 2015-08-14T17:56:43.967@gibberish: What is wrong with the answer below? – harrymc – 2018-08-01T06:03:15.757
I am looking for a cannonical/authoritative answer to whether ANYTHING is possible within the Excel/VBA object model. For example, there is an Excel VBE Object Model and I am wondering if the VBE can be directly programmed to solve this problem? *(I am open to the authoritative answer that you can't get there from here - if that is indeed the authoritative answer)*
– cssyphus – 2018-08-01T15:25:35.087@gibberish: Nope, even anadd-in cannot intercept hotkeys.
– harrymc – 2018-08-04T16:41:49.240