P
PaulW
I'm making a calculator type userform. It will be easier to use that for
someone to find a calculator, and will have additional options for inserting
values into the active sheet.
I've made the *current* buttons on the userform look exactly like the
numberpad on my keyboard, without the pgup, home, del, etc, just the numbers
and such.
What I'd like to do is let people simply use the numberpad on their keyboard
to "activate" the buttons on the userform, like 4, or +
I tried an
Application.OnKey "7","Command7_Click"
in the userform initialisation, but that didn't work, it threw up an error.
So I'm assuming that I can't link to a userform macro or something?
I also tried to use the "Accelerator" field, but that only works when Alt is
pressed down. And only works on the keyboard section, rather than the
numberpad. So I have one 7 that works when I press shift, but one that
doesn't.
Is there a quick way to assign the numberpad keys (including numlock) to
buttons on a userform? Since they're command buttons, it doesn't need to
press the button as such, just trigger the "commandbutton_click" event.
someone to find a calculator, and will have additional options for inserting
values into the active sheet.
I've made the *current* buttons on the userform look exactly like the
numberpad on my keyboard, without the pgup, home, del, etc, just the numbers
and such.
What I'd like to do is let people simply use the numberpad on their keyboard
to "activate" the buttons on the userform, like 4, or +
I tried an
Application.OnKey "7","Command7_Click"
in the userform initialisation, but that didn't work, it threw up an error.
So I'm assuming that I can't link to a userform macro or something?
I also tried to use the "Accelerator" field, but that only works when Alt is
pressed down. And only works on the keyboard section, rather than the
numberpad. So I have one 7 that works when I press shift, but one that
doesn't.
Is there a quick way to assign the numberpad keys (including numlock) to
buttons on a userform? Since they're command buttons, it doesn't need to
press the button as such, just trigger the "commandbutton_click" event.