VBA Constants

VBA has many built-in constants that are referred to as intrinsic constants.


VBA.Constants

These are just constants and not an enumeration.
For more details, refer to the Strings & Characters page.

vbBack 
vbCr
vbCrLf
vbFormFeed
vbLf
vbNewLine
vbNullChar
vbNullString
vbObjectError
vbTab
vbVerticalTab

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)

VBA.FormShowConstants

For more details, refer to the Modeless Userforms page.

vbModal (1) 
vbModeless (0)

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)

VBA.vbCompareMethod

For more details, refer to the Comparing Strings page.

vbBinaryCompare (0) 
vbDatabaseCompare (2)
vbTextCompare (1)

VBA.vbDateTimeFormat

For more details, refer to the Dates & Times page.

vbGeneralDate (0) 
vbLongDate (1)
vbLongTime (3)
vbShortDate (2)
vbShortTime (4)

VBA.vbDayOfWeek

For more details, refer to the Dates & Times page.

vbFriday (6) 
vbMonday (2)
vbSaturday (7)
vbSunday (1)
vbThursday (5)
vbTuesday (3)
vbUseSystemDayOfWeek (0)
vbWednesday (4)

VBA.vbFirstWeekOfYear

For more details, refer to the Dates & Times page.

vbFirstFourDays (2) 
vbFirstFullWeek (3)
vbFirstJan1 (1)
vbUseSystem (0)

VBA.vbFileAttribute

For more details, refer to the DIR page.

vbAlias (64) 
vbArchive (32)
vbDirectory (16)
vbHidden (2)
vbNormal (0)
vbReadOnly (1)
vbSystem (4)
vbVolume (8)

VBA.vbMsgBoxResult

For more details, refer to the MsgBox page.

vbAbort (3) 
vbCancel (2)
vbIgnore (5)
vbNo (7)
vbOK (1)
vbRetry (4)
vbYes (6)

VBA.vbMsgBoxStyle

For more details, refer to the MsgBox page.

vbAbortRetryIgnore (2) 
vbApplicationModal (0)
vbCritical (16)
vbDefaultButton1 (0)
vbDefaultButton2 (256)
vbDefaultButton3 (512)
vbDefaultButton4 (768)
vbExclamation (48)
vbInformation (64)
vbMsgBoxHelpButton (16384)
vbMsgBoxRight (524288)
vbMsgBoxRtlReading (1048576)
vbMsgBoxSetForeground (65536)
vbOKCancel (1)
vbOKOnly (0)
vbQuestion (32)
vbRetyrCancel (5)
vbSystemModal (4096)
vbYesNo (4)
vbYesNoCancel (3)

VBA.vbQueryClose

For more details, refer to the Userforms page.

vbAppTaskManager (3) 
vbAppWindows (2)
vbFormCode (1)
vbFormControlMenu (0)
vbFormMDIForm (4)

VBA.vbStrConv

For more details, refer to the Comparing Strings page.

vbFromUnicode (128) 
vbHiragana (32)
vbKatakana (16)
vbLowerCase (2)
vbNarrow (8)
vbProperCase (3)
vbUnicode (64)
vbUpperCase (1)
vbWide (4)

VBA.vbTriState

vbFalse (0) 
vbTrue (-1)
vbUseDefault (-2)

VBA.vbVarType

For more details, refer to the VarType Function page.

vbArray (8192) 
vbBoolean (11)
vbByte (17)
vbCurrency (6)
vbDataObject (13)
vbDate (7)
vbDecimal (14)
vbDouble (5)
vbEmpty (0)
vbError (10)
vbInteger (2)
vbLong (3)
vbNull (1)
vbObject (9)
vbSingle (4)
vbString (8)
vbUserDefinedType (36)
vbVariant (12)

VBA.vbAppWinStyle

vbHide (0) 
vbMaximizedFocus (3)
vbMinimizedFocus (2)
vbMinimizedNoFocus (6)
vbNormalFocus (1)
vbNormalNoFocus (4)

VBA.vbCalendar

vbCalGreg (0) 
vbCalHijri (1)

VBA.vbCallType

vbGet (2) 
vbLet (4)
vbMethod (1)
vbSet (8)

VBA.vbIMEStatus

vbIMEAlphaDbl (7) 
vbIMEAlphaSng (8)
vbIMEDisable (3)
vbIMEHiragana (4)
vbIMEKatakanaDbl (5)
vbIMEKatakanaSng (6)
vbIMEModeAlpha (8)
vbIMEModeAlphaFull (7)
vbIMEModeDisable (3)
vbIMEModeHangul (10)
vbIMEModeHangulFull (9)
vbIMEModeHiragana (4)
vbIMEModeKatakana (5)
vbIMEModeKatakanaHalf (6)
vbIMEModeNoControl (0)
vbIMEModeOff (2)
vbIMEModeOn (1)
vbIMENoOp (0)
vbIMEOff (2)
vbIMEOn (1)


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext