Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I'm trying to use Onkey method for the first time, but it fails, even if I try the example in XL2003 Help: Application.OnKey "^{+}", "InsertProc" Nothing happens when I press CTRL+{+} button. I checked EnableEvents, it was set true. What can be the problem? Thanks, Stefi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stefi,
Nothing happens when I press CTRL+{+} button. I checked EnableEvents, it was set true. What can be the problem? ON my keyboard, the plus appears above the equal sign, so I need to hold the shift key too to make it happen. Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jan,
Yes, if I press the CTRL+SHIFT+Plus sign(in the upper row of the keyboard) it works. I tried CTRL+Plus sign(on the numeric keypad), I didn't know that Onkey doesn't affect the numeric keys. Or does it? If so, how? Regards, Stefi €˛Jan Karel Pieterse€¯ ezt Ć*rta: Hi Stefi, Nothing happens when I press CTRL+{+} button. I checked EnableEvents, it was set true. What can be the problem? ON my keyboard, the plus appears above the equal sign, so I need to hold the shift key too to make it happen. Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stefi,
I didn't know that Onkey doesn't affect the numeric keys. Or does it? If so, how? Me neither and unfortunately, I cannot test this right now either (laptop without num pad). Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
By the way Jan, is it possible to pass a parameter to a sub triggered by
Onkey, something like this: Application.OnKey "^{+}", "InsertProc(parameter)" Stefi €˛Jan Karel Pieterse€¯ ezt Ć*rta: Hi Stefi, Nothing happens when I press CTRL+{+} button. I checked EnableEvents, it was set true. What can be the problem? ON my keyboard, the plus appears above the equal sign, so I need to hold the shift key too to make it happen. Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stefi,
By the way Jan, is it possible to pass a parameter to a sub triggered by Onkey, something like this: Application.OnKey "^{+}", "InsertProc(parameter)" Not that I know of. But you can declare a variable at the top of the module and use that inside the called routine. That variable will retain its value for the duration of the project and can be altered (and read) by other subs in the same module. Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Jan Karel Pieterse Wrote: Hi Stefi, I didn't know that Onkey doesn't affect the numeric keys. Or does it? If so, how? Me neither and unfortunately, I cannot test this right now either (laptop without num pad). Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Absolutely no idea if it works, and no time to check before thi evening, but isnt there something like vbKeyNumpadPlus? I think it works for numbers, if it does, shouldnt be too hard t figure out for plus key. Try something like -Application.OnKey "{" & vbKeyNumpad1 & "}", "MyMacro"- As I said, I'm wandering the net lately about excel vb code, and I kno I've seen that - but no idea if it works -- lonfnic ----------------------------------------------------------------------- lonfnico's Profile: http://www.excelforum.com/member.php...fo&userid=3339 View this thread: http://www.excelforum.com/showthread.php?threadid=53257 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jan,
Please let me know if you find an answer! Regards, Stefi €˛Jan Karel Pieterse€¯ ezt Ć*rta: Hi Stefi, I didn't know that Onkey doesn't affect the numeric keys. Or does it? If so, how? Me neither and unfortunately, I cannot test this right now either (laptop without num pad). Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OnKey | Excel Programming | |||
Help with using OnKey | Excel Programming | |||
onkey help | Excel Programming | |||
application.onkey doesn't work | Excel Programming | |||
onkey | Excel Programming |