可在代碼中的任何地方用下列常數代替實際值:
常數值描述
vbKeyLButton0x1鼠標左鍵
vbKeyRButton0x2鼠標右鍵
vbKeyCancel0x3CANCEL鍵
vbKeyMButton0x4鼠標中鍵
vbKeyBack0x8BACKSPACE鍵
vbKeyTab0x9TAB鍵
vbKeyClear0xCCLEAR鍵
vbKeyReturn0xDENTER鍵
vbKeyShift0x10SHIFT鍵
vbKeyControl0x11CTRL鍵
vbKeyMenu0x12MENU鍵
vbKeyPause0x13PAUSE鍵
vbKeyCapital0x14CAPSLOCK鍵
vbKeyEscape0x1BESC鍵
vbKeySpace0x20SPACEBAR鍵
vbKeyPageUp0x21PAGEUP鍵
vbKeyPageDown0x22PAGEDOWN鍵
vbKeyEnd0x23END鍵
vbKeyHome0x24HOME鍵
vbKeyLeft0x25LEFTARROW鍵
vbKeyUp0x26UPARROW鍵
vbKeyRight0x27RIGHTARROW鍵
vbKeyDown0x28DOWNARROW鍵
vbKeySelect0x29SELECT鍵
vbKeyPrint0x2APRINTSCREEN鍵
vbKeyExecute0x2BEXECUTE鍵
vbKeySnapshot0x2CSNAPSHOT鍵
vbKeyInsert0x2DINSERT鍵
vbKeyDelete0x2EDELETE鍵
vbKeyHelp0x2FHELP鍵
vbKeyNumlock0x90NUMLOCK鍵
A至Z鍵與A杴Z字母的ASCII碼相同:
常數值描述
vbKeyA65A鍵
vbKeyB66B鍵
vbKeyC67C鍵
vbKeyD68D鍵
vbKeyE69E鍵
vbKeyF70F鍵
vbKeyG71G鍵
vbKeyH72H鍵
vbKeyI73I鍵
vbKeyJ74J鍵
vbKeyK75K鍵
vbKeyL76L鍵
vbKeyM77M鍵
vbKeyN78N鍵
vbKeyO79O鍵
vbKeyP80P鍵
vbKeyQ81Q鍵
vbKeyR82R鍵
vbKeyS83S鍵
vbKeyT84T鍵
vbKeyU85U鍵
vbKeyV86V鍵
vbKeyW87W鍵
vbKeyX88X鍵
vbKeyY89Y鍵
vbKeyZ90Z鍵
0至9鍵與數字0杴9的ASCII碼相同:
常數值描述
vbKey0480鍵
vbKey1491鍵
vbKey2502鍵
vbKey3513鍵
vbKey4524鍵
vbKey5535鍵
vbKey6546鍵
vbKey7557鍵
vbKey8568鍵
vbKey9579鍵
下列常數代表數字鍵盤上的鍵:
常數值描述
vbKeyNumpad00x600鍵
vbKeyNumpad10x611鍵
vbKeyNumpad20x622鍵
vbKeyNumpad30x633鍵
vbKeyNumpad40x644鍵
vbKeyNumpad50x655鍵
vbKeyNumpad60x666鍵
vbKeyNumpad70x677鍵
vbKeyNumpad80x688鍵
vbKeyNumpad90x699鍵
vbKeyMultiply0x6AMULTIPLICATIONSIGN(*)鍵
vbKeyAdd0x6BPLUSSIGN( )鍵
vbKeySeparator0x6CENTER鍵
vbKeySubtract0x6DMINUSSIGN(杴)鍵
vbKeyDecimal0x6EDECIMALPOINT(.)鍵
vbKeyDivide0x6FDIVISIONSIGN(/)鍵
下列常數代表功能鍵:
常數值描述
vbKeyF10x70F1鍵
vbKeyF20x71F2鍵
vbKeyF30x72F3鍵
vbKeyF40x73F4鍵
vbKeyF50x74F5鍵
vbKeyF60x75F6鍵
vbKeyF70x76F7鍵
vbKeyF80x77F8鍵
vbKeyF90x78F9鍵
vbKeyF100x79F10鍵
vbKeyF110x7AF11鍵
vbKeyF120x7BF12鍵
vbKeyF130x7CF13鍵
vbKeyF140x7DF14鍵
vbKeyF150x7EF15鍵
vbKeyF160x7FF16鍵->