VB.NET Language Pocket Reference
1.8 Enumerations
The Microsoft.VisualBasic namespace also defines a number of enumerations. Many of their members are functionally identical to almost identically named constants listed in the aforementioned Section 1.7.
1.8.1 AppWinStyle Enumeration
Determines the appearance and behavior of the window opened by the Shell function.
| Hide | MinimizedNoFocus |
| MaximizedFocus | NormalFocus |
| MinimizedFocus | NormalNoFocus |
1.8.2 CallType Enumeration
Defines the type of procedure invoked by the CallByName function.
| Get | Set |
| Method |
1.8.3 CompareMethod Enumeration
Used with a variety of string comparison methods (such as InStr, StrComp, and Replace) to determine whether the comparison is case sensitive or insensitive.
| Binary | Text |
1.8.4 ControlChars Class
Values representing a number of control characters are available as static read-only fields of the ControlChars class. They can be referenced just as enumerated members; for example:
Addr = "123 West St. & ControlChars.CrLf & _
"Apt. 12C"
| Back | NewLine |
| Cr | NullChar |
| CrLf | Quote |
| FormFeed | Tab |
| Lf | VerticalTab |
1.8.5 DateFormat Enumeration
Defines the format of the date returned by the FormatDateTime function.
| GeneralDate | ShortDate |
| LongDate | ShortTime |
| LongTime |
1.8.6 DateInterval Enumeration
Defines the date interval for date/time functions, such as DateDiff, DatePart, and DateAdd.
| Day | Quarter |
| DayOfYear | Second |
| Hour | Weekday |
| Minute | WeekOfYear |
| Month | Year |
1.8.7 DueDate Enumeration
Used with the FV, IPmt, NPer, Pmt, PPmt, PV, and Rate functions to define whether a payment is due at the beginning or end of a period.
| BegOfPeriod | EndOfPeriod |
1.8.8 FileAttribute Enumeration
Used with the Dir, GetAttr, and SetAttr functions to set a file's attributes or to retrieve files with particular attributes set.
| Archive | ReadOnly |
| Directory | System |
| Hidden | Volume |
| Normal |
1.8.9 FirstDayOfWeek Enumeration
Used with the DatePart, DateDiff, Weekday, and WeekdayName functions to define the first day of the week and to interpret the function's return value.
| Friday | System |
| Monday | Tuesday |
| Saturday | Thursday |
| Sunday | Wednesday |
1.8.10 FirstWeekOfYear Enumeration
Used with the DatePart and DateDiff functions to define the first week of the year and to interpret the function's return value.
| FirstFourDays | Jan1 |
| FirstFullWeek | System |
1.8.11 MsgBoxResult Enumeration
Represents the return value of the MsgBox function.
| Abort | OK |
| Cancel | Retry |
| Ignore | Yes |
| No |
1.8.12 MsgBoxStyle Enumeration
Defines the appearance and behavior of a message box.
| AbortRetryIgnore | MsgBoxRtlREading |
| ApplicationModal | MsgBoxSetForeground |
| Critical | OKCancel |
| DefaultButton1 | OKOnly |
| DefaultButton2 | Question |
| DefaultButton3 | RetryCancel |
| Exclamation | SystemModal |
| Information | YesNo |
| MsgBoxHelp | YesNoCancel |
| MsgBoxRight |
1.8.13 OpenAccess Enumeration
Used with the FileOpen function to determine how the file can be accessed.
| Default | ReadWrite |
| Read | Write |
1.8.14 OpenMode Enumeration
Used with the FileOpen function and returned by the FileAttr function and indicates the file access mode. The Microsoft.VisualBasic namespace also defines an OpenModeTypes enumeration that is identical to OpenMode except for adding an Any member.
| Append | Output |
| Binary | Random |
| Input |
1.8.15 OpenShare Enumeration
Used with the FileOpen function to determine the file's share level.
| Default | LockWrite |
| LockRead | Shared |
| LockReadWrite |
1.8.16 TriState Enumeration
Used with the FormatCurrency, FormatNumber, and FormatPercent functions to control the format of a number.
| False | UseDefault |
| True |
1.8.17 VariantType Enumeration
Returned by the VarType function to indicate the data type of a variable.
| Array | Error |
| Boolean | Integer |
| Byte | Long |
| Char | Null |
| Currency | Object |
| DataObject | Short |
| Date | Single |
| Decimal | String |
| Double | UserDefinedType |
| Empty | Variant |
1.8.18 VbStrConv Enumeration
Supplied as a parameter to the StrConv function to indicate how a string is to be converted.
| Hiragana | ProperCase |
| Katakana | SimplifiedChinese |
| LinguisticCasing | TraditionalChinese |
| LowerCase | UpperCase |
| Narrow | Wide |
| None |