VBA编程之Keycode常数的键位代码总结
Admin | 2012-4-28 10:12:34 | 被阅次数 | 11209
以下的知识,为您讲述VBA编程之Keycode常数的键位代码
①鼠标类
常数 值描述
--------------
vbKeyLButton 0x1 鼠标左键
vbKeyRButton 0x2 鼠标右键
vbKeyCancel 0x3 CANCEL 键
vbKeyMButton 0x4 鼠标中键
②键盘类的键位Keycode
常数 值描述
--------------
vbKeyBack 0x8 BACKSPACE 键
vbKeyTab 0x9 TAB 键
vbKeyClear 0xC CLEAR 键
vbKeyReturn 0xD ENTER 键
vbKeyShift 0x10 SHIFT 键
vbKeyControl 0x11 CTRL 键
vbKeyMenu 0x12 MENU 键
vbKeyPause 0x13 PAUSE 键
vbKeyCapital 0x14 CAPS LOCK 键
vbKeyEscape 0x1B ESC 键
vbKeySpace 0x20 SPACEBAR 键
vbKeyPageUp 0x21 PAGE UP 键
vbKeyPageDown 0x22 PAGE DOWN 键
vbKeyEnd 0x23 END 键
vbKeyHome 0x24 HOME 键
vbKeyLeft 0x25 LEFT ARROW 键
vbKeyUp 0x26 UP ARROW 键
vbKeyRight 0x27 RIGHT ARROW 键
vbKeyDown 0x28 DOWN ARROW 键
vbKeySelect 0x29 SELECT 键
vbKeyPrint 0x2A PRINT SCREEN 键
vbKeyExecute 0x2B EXECUTE 键
vbKeySnapshot 0x2C SNAPSHOT 键
vbKeyInsert 0x2D INSERT 键
vbKeyDelete 0x2E DELETE 键
vbKeyHelp 0x2F HELP 键
vbKeyNumlock 0x90 NUM LOCK 键