Discussion:
Keycodes for the keys
(too old to reply)
Wayne Morgan
2003-09-08 12:23:30 UTC
Permalink
Go to the VBA help file and do a search on ASCII. To get to the VBA help file you need to
open a code window (Alt+F11) first.

The names of the topics are:
Character Set (0-127)
Character Set (128-255)
KeyCode Constants
--
Wayne Morgan
Microsoft Access MVP
Where can find a chart-table for all the keycodes
for all the keys on the keyboard ?
enter = 13
tab = 9
...........
...........
giannis
2003-09-08 14:00:21 UTC
Permalink
I need the decimal numbers of keys (no the hexadesimal)
The help has only the hexadesimal :

vbKeyLButton 0x1 Left mouse button
vbKeyRButton 0x2 Right mouse button
vbKeyCancel 0x3 CANCEL key
vbKeyMButton 0x4 Middle mouse button
vbKeyBack 0x8 BACKSPACE key
vbKeyTab 0x9 TAB key
vbKeyClear 0xC CLEAR key
vbKeyReturn 0xD ENTER key
vbKeyShift 0x10 SHIFT key
vbKeyControl 0x11 CTRL key
vbKeyMenu 0x12 MENU key
vbKeyPause 0x13 PAUSE key
vbKeyCapital 0x14 CAPS LOCK key
vbKeyEscape 0x1B ESC key
vbKeySpace 0x20 SPACEBAR key
vbKeyPageUp 0x21 PAGE UP key
vbKeyPageDown 0x22 PAGE DOWN key
vbKeyEnd 0x23 END key
vbKeyHome 0x24 HOME key
vbKeyLeft 0x25 LEFT ARROW key
vbKeyUp 0x26 UP ARROW key
Dirk Goldgar
2003-09-08 15:26:25 UTC
Permalink
Post by giannis
I need the decimal numbers of keys (no the hexadesimal)
vbKeyLButton 0x1 Left mouse button
vbKeyRButton 0x2 Right mouse button
vbKeyCancel 0x3 CANCEL key
vbKeyMButton 0x4 Middle mouse button
vbKeyBack 0x8 BACKSPACE key
vbKeyTab 0x9 TAB key
vbKeyClear 0xC CLEAR key
vbKeyReturn 0xD ENTER key
vbKeyShift 0x10 SHIFT key
vbKeyControl 0x11 CTRL key
vbKeyMenu 0x12 MENU key
vbKeyPause 0x13 PAUSE key
vbKeyCapital 0x14 CAPS LOCK key
vbKeyEscape 0x1B ESC key
vbKeySpace 0x20 SPACEBAR key
vbKeyPageUp 0x21 PAGE UP key
vbKeyPageDown 0x22 PAGE DOWN key
vbKeyEnd 0x23 END key
vbKeyHome 0x24 HOME key
vbKeyLeft 0x25 LEFT ARROW key
vbKeyUp 0x26 UP ARROW key
You really should learn to translate from hexadecimal to decimal. In the
mean time, you can use the debug window to get the decimal values by
following this example:

?vbKeyUp
38

And you can convert any given hex value by using "&h" notation instead
of "0x":

?&h26
38
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
Loading...