Log in

View Full Version : [SOLVED:] Hotkeys for Userform controls



2222puru
11-10-2019, 03:22 PM
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:bow:.

Logit
11-11-2019, 12:49 AM
.
Not tested here ..presented as reference resource for your review :

https://stackoverflow.com/questions/1340084/assigning-hotkeys-to-buttons-on-forms-created-for-excel-vba

2222puru
11-11-2019, 10:17 AM
.
Not tested here ..presented as reference resource for your review :

https://stackoverflow.com/questions/1340084/assigning-hotkeys-to-buttons-on-forms-created-for-excel-vba
:whistle:This link proved fruitful to me. :friends: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.:super:

Logit
11-12-2019, 02:18 AM
You are welcome.