ATnCy‖Basic Constants

Contents
xcC9J‖

# ev3DS‖Basic Constants

K6sdH‖Constants used in Basic programs

UoLBy‖

## R2DAa‖Boolean constants

YZCRB‖Name | QdhaX‖Type | 2ZfCb‖Value
--- | --- | ---
True | Boolean | 1
False | Boolean | 0

### EFSA4‖Example:

                Dim bPositive as Boolean
                bPositive = True

tHQxL‖

## DLv8z‖Mathematical constant

tKc55‖Name | LsGpf‖Type | SKTAY‖Value
--- | --- | ---
Pi | Double | 3.14159265358979

### EFSA4‖Example:

                Function Rad2Deg( aRad as Double) As Double
                 Rad2Deg = aRad * 180.00 / Pi
                End Function

jMu6A‖

## hdZmR‖Object Constants

XzWwC‖Name | 4H8QB‖Type | khVxN‖Usage
--- | --- | ---
Empty | Variant | wFRg7‖The Empty value indicates that the variable is not initialized.
Null | null | fBDqJ‖Indicates that the variable does not contain data.
Nothing | Object | bP2W3‖Assign the Nothing object to a variable to remove a previous assignment.

### EFSA4‖Example:

                SubExampleEmpty
                    Dim sVar As Variant
                    sVar = Empty
                DXSTQ‖    Print IsEmpty(sVar) ' Returns True
                End Sub
                Sub ExampleNull
                    Dim vVar As Variant
                    MsgBox IsNull(vVar)
                End Sub
                Sub ExampleNothing
                    Dim oDoc As Object
                    Set oDoc = ThisComponent
                    Print oDoc.Title
                    oDoc = Nothing
                FKiTS‖    Print oDoc ' Error
                End Sub

## UDTHw‖MsgBox Named Constants

Bf6za‖Named constant | 77fDA‖Integer value | oGbBz‖Definition
--- | --- | ---
MB_OK | 0 | vymRc‖Display OK button only.
MB_OKCANCEL | 1 | mRRGS‖Display OK and Cancel buttons.
MB_ABORTRETRYIGNORE | 2 | dTHCd‖Display Abort, Retry, and Ignore buttons.
MB_YESNOCANCEL | 3 | ACrFj‖Display Yes, No, and Cancel buttons.
MB_YESNO | 4 | GtCAu‖Display Yes and No buttons.
MB_RETRYCANCEL | 5 | UREcH‖Display Retry and Cancel buttons.
MB_ICONSTOP | 16 | Fd4PG‖Add the Stop icon to the dialog.
MB_ICONQUESTION | 32 | yfaDF‖Add the Question icon to the dialog.
MB_ICONEXCLAMATION | 48 | ANc5p‖Add the Exclamation Point icon to the dialog.
MB_ICONINFORMATION | 64 | AtuHu‖Add the Information icon to the dialog.
| 128 | gDmyx‖First button in the dialog as default button.
MB_DEFBUTTON2 | 256 | JHgX7‖Second button in the dialog as default button.
MB_DEFBUTTON3 | 512 | trCb5‖Third button in the dialog as default button.

## CABUt‖GetAttr Named Constants

hFQCm‖Named constant | zzPWS‖Value | iKvsu‖Definition
--- | --- | ---
ATTR_NORMAL | 0 | aW6nL‖ Normal files.
ATTR_READONLY | 1 | rEyZA‖ Read-only files.
ATTR_HIDDEN | 2 | y5rDp‖ Hidden file
ATTR_SYSTEM | 4 | mxBAa‖ System file
ATTR_VOLUME | 8 | PEqDp‖ Returns the name of the volume
ATTR_DIRECTORY | 16 | WNbBd‖ Returns the name of the directory only.
ATTR_ARCHIVE | 32 | F9thH‖ File was changed since last backup (Archive bit).

## RpHEU‖Data Type Named Constants

poMCX‖TypeName values | AqZZY‖Named constant | VarType values | ZyZMD‖Variable type
--- | --- | --- | ---
…() | 8192 | wRiCY‖Array of variables
Boolean | 11 | 9oyzE‖Boolean variable
Byte | 17 | D3K3Z‖Byte variable
Date | V_DATE | 7 | dQbgL‖Date variable
Currency | V_CURRENCY | 6 | gmBRv‖Currency variable
Double | V_DOUBLE | 5 | 44XVW‖Double-precision floating-point variable
Error | 11 | LLtX4‖Error type variable
Integer | V_INTEGER | 2 | nZq5t‖Integer variable
Long | V_LONG | 3 | 2ACjE‖Long integer variable
Object | 9 | TAHDS‖Object variable
Single | V_SINGLE | 4 | vvV5T‖Single-precision floating-point variable
String | V_STRING | 8 | fXQwQ‖String variable
Variant | 12 | LEs6v‖Variant variable (can contain all types specified by the definition)
Empty | V_EMPTY | 0 | QkEij‖Uninitialized Variant variable
Null | V_NULL | 1 | CLAF9‖No valid data

2wLXR‖

## Nbv6Q‖Additional VBA constants

3ekcB‖The following constants are available when VBA compatibility mode is enabled

R9TFi‖This constant, function or object is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.

G9yiL‖

### SKtyw‖VBA MsgBox named constants

4C5cf‖Name | ANPqD‖Value
--- | ---
vbApplicationModal | 0
vbDefaultButton1 | 0
vbOKOnly | 0
vbOKCancel | 1
vbAbortRetryIgnore | 2
vbYesNoCancel | 3
vbYesNo | 4
vbRetryCancel | 5
vbCritical | 16
vbQuestion | 32
vbExclamation | 48
vbInformation | 64
vbDefaultButton2 | 256
vbDefaultButton3 | 512
vbDefaultButton4 | 768
vbSystemModal | 4096
vbMsgBoxHelpButton | 16384
vbMsgBoxSetForeground | 65536
vbMsgBoxRight | 524288
vbMsgBoxRtlReading | 1048576

### XSqq4‖VBA Color Named Constants

GX7VB‖Named constant | 4wBCk‖Red, Green, Blue composition
--- | ---
vbBlack | RGB(0, 0, 0)
vbBlue | RGB(0, 0, 255)
vbCyan | RGB(0, 255, 255)
vbGreen | RGB(0, 255, 0)
vbMagenta | RGB(255, 0, 255)
vbRed | RGB(255, 0, 0)
vbYellow | RGB(255, 255, 0)
vbWhite | RGB(255, 255, 255)

### y4iia‖Variable Type Named Constants

AzBpy‖Named constant | SrPWN‖Decimal value
--- | ---
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

### PVJr3‖FormatDateTime VBA Named Constants

THiYn‖Named Constant | AoBxM‖Value | TtduL‖Description
--- | --- | ---
vbGeneralDate | 0 | G67rA‖Displays a date and/or time as defined in your system's General Date setting. If a date only, no time is displayed; If a time only, no date is displayed.
vbLongDate | 1 | DgHi6‖Display a date using the long date format specified in your computer's regional settings.
vbShortDate | 2 | qEzCP‖Display a date using the short date format specified in your computer's regional settings.
vbLongTime | 3 | PdzuG‖Displays a time as defined in your system's Long Time settings.
vbShortTime | 4 | TJciz‖Display a time using the 24-hour format (hh:mm).

### jUhTB‖StrConv VBA Named Constants

Y7PoD‖Conversion | gzFBG‖Value | 6dDST‖Description
--- | --- | ---
vbUpperCase | 1 | WmnMz‖Converts Text characters to uppercase.
vbLowerCase | 2 | FMyrC‖Converts Text characters lowercase.
vbProperCase | 3 | 8HoXG‖Converts the first letter of every word in Text to uppercase.
vbWide | 4 | TB54v‖Converts narrow (half-width) characters in Text to wide (full-width) characters.
vbNarrow | 8 | gw9Tg‖Converts wide (full-width) characters in Text to narrow (half-width) characters.
vbKatakana | 16 | fAVnd‖Converts Hiragana characters in Text to Katakana characters.
vbHiragana | 32 | BmF5K‖Converts Katakana characters in Text to Hiragana characters.
vbUnicode | 64 | 2tpZF‖Converts Text characters to Unicode characters using the default code page of the system.
vbFromUnicode | 128 | 4VdbE‖Converts Text characters from Unicode to the default code page of the system.

### pU993‖WeekDayName VBA Named Constants

mXgMu‖Value | PGZPg‖VBA Constant | NHbqP‖Description
--- | --- | ---
0 | vbUseSystemDayOfWeek | zLssD‖Use system locale settings
1 | vbSunday | EWo2z‖Sunday (default)
2 | vbMonday | BHVEx‖Monday
3 | vbTuesday | TFvid‖Tuesday
4 | vbWednesday | fiXHk‖Wednesday
5 | vbThursday | A9CRq‖Thursday
6 | vbFriday | sBtM4‖Friday
7 | vbSaturday | bXcCx‖Saturday

### Y5GhB‖Miscellaneous VBA Named Constants

SHFCr‖Named constant | HtGwh‖Hexadecimal (decimal) value | dmCG8‖Description
--- | --- | ---
vbTrue | -1 | MF8DE‖Part of vbTriState enumeration.
vbFalse | 0 | NueYf‖Part of vbTriState enumeration.
vbUseDefault | -2 | aZCUB‖Part of vbTriState enumeration.
vbCr | \x0D (13) | yTGGA‖CR - Carriage return
vbCrLf | \x0D\x0A (13 10) | LkFkf‖CRLF - Carriage return and line feed
vbFormFeed | \x0c (12) | taq8u‖FF - Form feed
vbLf | \x0A (10) | sTnbW‖LF - Line feed
vbNewLine | CncC2‖\x0D\x0A (13 10) for Windows CPCWE‖\x0A (10) for other systems | xCDkG‖LF or CRLF
vbNullString | "" | PwtxJ‖Null string
vbTab | \x09 (9) | GZhKy‖HT - Horizontal tab
vbVerticalTab | \x0B (11) | YDtN4‖VT - Vertical tab

Please support us!