Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Tatsujin" wrote in message
How can I detect when a user presses Ctrl+Alt+G (or any similar key combination) while any worksheet is active? Thanks If you only want to trap one or perhaps a handful of key combinations use Application.OnKey https://docs.microsoft.com/en-us/off...lication.onkey Sub CtrlAltG(bInit As Boolean) Application.OnKey "^%g", IIf(bInit, "TestCtrlAltG", "") End Sub Sub TestCtrlAltG() MsgBox "TestCtrlAltG" End Sub Don't forget to clear any OnKeys when done, for example in the workoks close event For something more general purpose look into use of the GetAsyncKeyState API, though Alt strokes probably won't pass through the sheet, so to speak. Some examples from long ago! https://groups.google.com/g/microsof...tAsyncKeyState Peter T |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a keyboard shortcut to fill handle a large # of cells? | Excel Discussion (Misc queries) | |||
What is keyboard shortcut equivalent to drag the fill handle | Excel Discussion (Misc queries) | |||
Keyboard command to replace double clicking the fill handle | Excel Discussion (Misc queries) | |||
How to handle all delete row events in excel | Excel Programming | |||
Office2003: Handle events for web charting component | Excel Programming |