Consulting

Results 1 to 4 of 4

Thread: Hotkeys for Userform controls

  1. #1

    Hotkeys for Userform controls

    Hi,

    I have taken some text boxes and command buttons on my userform and written a number of functions which are working well. Now i want to assign hotkeys for these controls to make my work easy. I don't want to assign accelerators as they require pressing ALT before using them. I want to assign hotkeys just like "onKey" in excel VBA.

    I made some research in the Interment and found "keyBindings" which is similar to what i want, but I don't know how to use it within the Userform level, i.e., I want these hotkeys work only if the userform is on screen, not for whole document. Could anyone help me out on this.

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    606
    Location
    .
    Not tested here ..presented as reference resource for your review :

    https://stackoverflow.com/questions/...-for-excel-vba

  3. #3
    Quote Originally Posted by Logit View Post
    .
    Not tested here ..presented as reference resource for your review :

    https://stackoverflow.com/questions/...-for-excel-vba
    This link proved fruitful to me. Thanks a lot Logit for sharing this helpful link. The KeyUp event for the control is working wonderfully. Now all the controls and their corresponding functions are on my fingertips. It saves a lot of my working hours on a daily basis.

  4. #4
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    606
    Location
    You are welcome.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •