Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

How to test what key was pressed?

  Asked By: Keira    Date: Sep 05    Category: MS Office    Views: 1282
  

In Excel vba, how do I test what key a user just pressed? In VBA,
how do I examine what key users just pressed?How do I do the following code of
if portion?

If PGDN-key-is pressed then .......

If PGUP-key-is pressed then .......

If LEFT-key-is pressed then .......

If RIGHT-key-is pressed then .......

If UP-key-is pressed then .......

If DOWN-key-is pressed then ......

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Adelfrid Fischer     Answered On: Sep 05

Visit
groups.google.com/advanced_group_search?q=group:*Excel*&num=100,
type in [test user key  press] without the [], and browse through the
results. That should get you started.

The best early result is
groups.google.com/.../browse
_thread/thread/810554bd81a31fb0/f3c0340853f05e7f?lnk=st&q=&rnum=5#f3c034
0853f05e7f - you should now search for &H11 and other key definitions.
Using Google web search for [&H11 VBA] I found this:
http://puremis.net/excel/code/061.shtml

For your code  portion, see the second web reference as well.

 
Didn't find what you were looking for? Find more on How to test what key was pressed? Or get search suggestion and latest updates.




Tagged: