VBA.Constants
VBA has many built-in constants that are referred to as intrinsic constants.
VBA.Constants
These are just constants and are not part of an enumeration.
For more details, refer to the Strings & Characters page.
vbBack
vbCr
vbCrLf
vbFormFeed
vbLf
vbNewLine
vbNullChar
vbNullString
vbObjectError
vbTab
vbVerticalTab
These can be accessed in a number of different ways.
VBA.Constants.vbNullString
Constants.vbNullString
vbNullString
VBA.ColorConstants
For more details, refer to the Colours page.
vbBlack (0)
vbBlue (16711680)
vbCyan (16776960)
vbGreen (65280)
vbMagenta (16711935)
vbRed (225)
vbWhite (167772115)
vbYellow (65535)
These can be accessed in a number of different ways.
VBA.ColorConstants.vbBlack
ColorConstants.vbBlack
vbBlack
VBA.FormShowConstants
For more details, refer to the Modeless Userforms page.
vbModal (1)
vbModeless (0)
These can be accessed in a number of different ways.
VBA.FormShowConstants.vbModal
FormShowConstants.vbModal
vbModal
VBA.KeyCodeConstants
vbKey0 (48)
vbKey1 (49)
vbKey2 (50)
vbKey3 (51)
vbKey4 (52)
vbKey5 (53)
vbKey6 (54)
vbKey7 (55)
vbKey8 (56)
vbKey9 (57)
vbKeyA (65)
vbKeyAdd (107)
vbKeyB (66)
vbKeyBack (8)
vbKeyC (67)
vbKeyCancel (3)
vbKeyCapital (20)
vbKeyClear (12)
vbKeyControl (17)
vbKeyD (68)
vbKeyDecimal (110)
vbKeyDelete (46)
vbKeyDivide (111)
vbKeyDown (40)
vbKeyE (69)
vbKeyEnd (35)
vbKeyEscape (27)
vbKeyExecute (43)
vbKeyF (70)
vbKeyF1 (112)
vbKeyF10 (121)
vbKeyF11 (122)
vbKeyF12 (123)
vbKeyF13 (124)
vbKeyF14 (125)
vbKeyF15 (126)
vbKeyF16 (127)
vbKeyF2 (113)
vbKeyF3 (114)
vbKeyF4 (115)
vbKeyF5 (116)
vbKeyF6 (117)
vbKeyF7 (118)
vbKeyF8 (119)
vbKeyF9 (120)
vbKeyG (71)
vbKeyH (72)
vbKeyHelp (47)
vbKeyHome (36)
vbKeyI (73)
vbKeyInsert (45)
vbKeyJ (74)
vbKeyK (75)
vbKeyL (76)
vbKeyLButton (1)
vbKeyLeft (37)
vbKeyM (77)
vbKeyMButton (4)
vbKeyMenu (18)
vbKeyMultiply (106)
vbKeyN (78)
vbKeyNumLock (144)
vbKeyNumPad0 (96)
vbKeyNumPad1 (97)
vbKeyNumPad2 (98)
vbKeyNumPad3 (99)
vbKeyNumPad4 (100)
vbKeyNumPad5 (101)
vbKeyNumPad6 (102)
vbKeyNumPad7 (103)
vbKeyNumPad8 (104)
vbKeyNumPad9 (105)
vbKeyO (79)
vbKeyP (80)
vbKeyPageDown (34)
vbKeyPageUp (33)
vbKeyPause (19)
vbKeyPrint (42)
vbKeyQ (81)
vbKeyR (82)
vbKeyRButton (2)
vbKeyReturn (13)
vbKeyRight (39)
vbKeyS (83)
vbKeySelect (41)
vbKeySeparator (108)
vbKeyShift (16)
vbKeySnapshot (44)
vbKeySpace (32)
vbKeySubtract (109)
vbKeyT (84)
vbKeyTab (9)
vbKeyU (85)
vbKeyUp (38)
vbKeyV (86)
vbKeyW (87)
vbKeyX (88)
vbKeyY (89)
vbKeyZ (90)
VBA.SystemColorConstants
For more details, refer to the Colours page.
vb3DDKShadow (-2147483627)
vb3DFace (-2147483633)
vb3DHighlight (-2147483628)
vb3DLight (-2147483626)
vb3DShadow (-2147483632)
vbActiveBorder (-2147483638)
vbActiveTitleBar (-2147483646)
vbApplicationWorkspace (-2147483636)
vbButtonFace (-2147483633)
vbButtonShadow (-2147483632)
vbButtonText (-2147483630)
vbDesktop (-2147483647)
vbGrayText (-2147483631)
vbHighlight (-2147483635)
vbHighlightText (-2147483634)
vbInactiveBorder (-2147483637)
vbInactiveCaptionText (-2147483629)
vbInactiveTitleBar (-2147483645)
vbInfoBackground (-2147483624)
vbInfoText (-2147483625)
vbMenuBar (-2147483644)
vbMenuText(-2147483641)
vbMsgBox (-2147483625)
vbMsgBoxText (-2147483624)
vbScrollBars (-2147483648)
vbTitleBarText (-2147483639)
vbWindowBackground (-2147483643)
vbWindowFrame (-2147483642)
vbWindowText (-2147483640)
vb Prefix
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext