Application.onKey non-functioning

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I tried adding more than one Application.onKey entries to capture up-arrow,
down-arrow, right-arrow and left-arrow keys, but, none of the procedures
associated with each of the Application.onKey entries are activated.
I tried using breakpoints and msgbox statement.
Is there a restriction on the number of Application.onKey entries ? Or is
there some other issue ?
Help would definitely be appreciated.
 
Hi, I have written a Sub that is triggered when I press CTRL+E (this act was
recorded using macro recorder). That sub contains the following statements.
Application.OnKey "{ESC}", "moveNone"
Application.OnKey "{UP}", "moveUp"
Application.OnKey "{DOWN}", "moveDown"
Application.OnKey "{LEFT}", "moveLeft"
Application.OnKey "{RIGHT}", "moveRight"
start
 
Sounds like you need to use a timer to move the selection, dependent on the
value set by the arrow keys. Or stop if ESC was pressed.

NickHK
 
hi
same issue
i got round it very inelegantly with:
setting up a command button
setting the accelerator to the key i wanted to use

the computer can still pick up these keypresses ie alt+k, when it seems to be blind to application.onkey "k","proc"

very irritating. i then set sticky keys on and pressed alt x2, to remove the need to keep pressing alt key with my short cut keys.

i tried putting :Application.SendKeys ("^{break}")
within the infinite loop, but this didnt work for me

any thoughts?
tom

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
hi
same issue
i got round it very inelegantly with:
setting up a command button
setting the accelerator to the key i wanted to use

the computer can still pick up these keypresses ie alt+k, when it seems to be blind to application.onkey "k","proc"

very irritating. i then set sticky keys on and pressed alt x2, to remove the need to keep pressing alt key with my short cut keys.

i tried putting :Application.SendKeys ("^{break}")
within the infinite loop, but this didnt work for me

any thoughts?
tom

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top