Groups

The table below lists each of the BASIC scripting Groups and the members of each Group.

Group Name

Description

Assignment

Erase, Let, LSet, RSet, Set

Constant

Empty Keyword—A variantvar that does not have any value.

False Keyword—A condexpr is false when its value is zero. A function that returns False returns the value 0.

Nothing Keyword—An objexpr that does not refer to any object.

Null Keyword—A variant expression that is null. A null value propagates through an expression causing the entire expression to be Null. Attempting to use a Null value as a string or numeric argument causes a run-time error. A Null value prints as "#NULL#".

Example:

Sub Main
X = Null
Debug.Print X = Null '#NULL#
Debug.Print IsNull(X) 'True
End Sub

True Keyword—A conditional expression is True when its value is non-zero. A function that returns True returns the value -1.

Conversion  

Array, CBool, CByte, CCur, CDate, CDec, CDbl, CInt, CLng, CSng, CStr, CVar, CVDate, CVErr, Val.

Data Type  

Below are the members of the Data Type group

Any Data Type—Any variable expression (Declare only).

Boolean Data Type—A True or False value.

Byte Data Type—An 8 bit unsigned integer value.

Currency Data Type—A 64 bit fixed point real. (A twos complement binary value scaled by 10000.)

Date Data Type—A 64 bit real value. The whole part represents the date, while the fractional part is the time of day. (December 30, 1899 = 0.) Use #date# as a literal date value in an expression.

Decimal Data Type—Win32 only. A 96 bit scaled real value. Decimal is not a valid variable type, but Variant variables can contain decimal values (see CDec). A decimal number is of the form: s*m*10^-p where

  • s - sign (+1 or -1)

  • m - mantissa, unsigned binary value of 96 bits (0 to 79,228,162,514,264,337,593,543,950,335)

  • p - scaling power (0 to +28)

Double Data Type—A 64 bit real value.

Integer Data Type—A 16 bit integer value.

Long Data Type—A 32 bit integer value.

Object Data Type—An object reference value.

PortInt Data Type—A portable integer value.

  • For Win16: A 16 bit integer value.

  • For Win32: A 32 bit integer value.

Single Data Type—A 32 bit real value.

String Data Type—An arbitrary length string value. Some useful string constants are predefined:

  • vbNullChar - same as Chr(0)

  • vbCrLf - same as Chr(13) & Chr(10)

  • vbCr - same as Chr(13)

  • vbLf - same as Chr(10)

  • vbBack - same as Chr(8)

  • vbFormFeed - same as Chr(12)

  • vbTab - same as Chr(9)

  • vbVerticalTab - same as Chr(11)

String*n Data Type—A fixed length (n) string value.

UserDialog Data Type—A usertype defined by Begin Dialog UserDialog.

Variant Data Type—An empty, numeric, currency, date, string, object, error code, null or array value.

DDE  

DDEExecute, DDEInitiate, DDEPoke, DDERequest, DDETerminate, DDETerminateAll

Declaration

#Reference, #Uses, Attribute, Class Module, Code Module, Const, Declare, Deftype, Dim, Enum...End Enum, FunctionEnd Function, Object Module, Option, Private, Property...End Property, Public, ReDim, Static, Sub...End Sub, Type...End Type. WithEvents

Dialog Function

DlgControlId, DlgCount, DlgEnable, DlgEnd, DlgFocus, DlgListBoxArray, DlgName, DlgNumber, DlgSetPicture, DlgText, DlgType, DlgValue, DlgVisible

Error Handling

Err, Error, On Error, Resume

File

ChDir, ChDrive, Close, CurDir, Dir, EOF, FileAttr, FileCopy, FileDateTime, FileLen, FreeFile, Get, GetAttr, Input, Input, Kill, Line Input, Loc, Lock, LOF, MkDir, Name, Open, Print, Put, Reset, RmDir, Seek, Seek, SetAttr, Unlock, Write

Flow Control

Call, CallByName, Do...Loop, End, Exit, For...Next, For Each...Next, GoTo, If...ElseIf...Else...End If, MacroRun, MacroRunThis, Select Case...End Select, Stop, While...Wend.

Math  

Abs, Atn, Cos, Exp, Fix, Int, Log, Randomize, Rnd, Round, Sgn, Sin, Sqr, Tan.

Miscellaneous

AppActivate, Attribute, Beep, CallersLine, Choose, Clipboard, Command, Debug.Print, DoEvents, Environ, Eval, IIf, KeyName, MacroDir, QBColor, Rem, RGB, SendKeys, Shell, Wait

Object

CreateObject, GetObject, Me, With...End With

Operator

Operators: +, -, ^, *, /, \, Mod, +, -, &, =, <>, <, >, <=, >=, Like. Not, And, Or, Xor, Eqv, Imp, Is.

Settings

DeleteSetting, GetAllSettings, GetSetting, SaveSetting

String

Asc, AscB, AscW, Chr, ChrB, ChrW, Format, Hex, InStr, InStrB, InStrRev, Join, LCase, Left, LeftB, Len, LenB, LTrim, Mid, MidB, Oct, Replace, Right, RightB, RTrim, Space, Split, String, Str, StrComp, StrConv, StrReverse, Trim, UCase

Time/Date

Date, DateAdd, DateDiff, DatePart, DateSerial, DateValue, Day, Hour, Minute, Month, MonthName, Now, Second, Time, Timer, TimeSerial, TimeValue, Weekday, WeekdayName, Year

User Dialog

Begin Dialog...End Dialog, CancelButton, CheckBox, ComboBox, DropListBox, GroupBox, ListBox, OKButton, OptionButton, OptionGroup, Picture, PushButton, Text, TextBox

User Input

Dialog, GetFilePath, InputBox, MsgBox, ShowPopupMenu

Variable Info

IsArray, IsDate, IsEmpty, IsError, IsMissing, IsNull, IsNumeric, IsObject, LBound, TypeName, UBound, VarType