Application wide Keyboard hook

  • Hi ,


    I have a few forms in a workbook. When the user clicks "CTRL+SHFT+M", i want to display a particular form. However, I want the capture this keystroke, even when excel application is not active i.e i need a system wide keyboard hook ... Can any one point me in the right direction/ examples of how this can be done using VBA?


    Many thanks !

  • Re: Application wide Keyboard hook


    Quote from tausif82

    Hi ,


    I have a few forms in a workbook. When the user clicks "CTRL+SHFT+M", i want to display a particular form. However, I want the capture this keystroke, even when excel application is not active i.e i need a system wide keyboard hook ... Can any one point me in the right direction/ examples of how this can be done using VBA?


    Many thanks !


    How do you expect a form to be displayed if the excel application is not active?

  • Re: Application wide Keyboard hook


    I need to capture the keystroke "CTRL+SHFT+M" even when excel application is not active & i believe this can be done using a global Keyboard hook... Am not much into Windows API & thus asked if there are any examples that capture particular keystrokes using VBA. I never asked for the "form to be displayed if the excel application is not active."


    Thanks,

  • Re: Application wide Keyboard hook


    I don't follow, you can have a Keyboard short cut in VBA - just see recording a macro, but for VBA to work the application has to be active.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!