Quick reference of  the Functions and Statements available

 

Type/Functions/Statements

______________________________________________________

Flow of Control

 

Goto, End, OnError, Stop, Do...Loop, Exit Loop, For...Next, Exit For, If..Then..Else...End If, Stop, While...Wend, Select Case

______________________________________________________

Converting

     

Chr, Hex, Oct, Str, CDbl, CInt, Clng, CSng, CStr, CVar, CVDate, Asc, Val, Date, DateSerial, DateValue, Format, Fix, Int, Day, Weekday, Month, Year, Hour, Minute, Second, TimeSerial, TimeValue

________________________________________________________________

Dialog

 

Text, TextBox, ListBox, DropList, ComboBox, CheckBox, OKButton, BeginDialog, EndDialog, OptionGroup, OKButton, CancelButton, PushButton, Picture, GroupBox, Multi-line TextBox,

______________________________________________________

File I/O

 

FileCopy, ChDir, ChDrive, CurDir, CurDir, MkDir,RmDir, Open, Close, Print #, Kill, FreeFile, LOF, FileLen, Seek, EOF, Write #, Input, Line Input, Dir, Name, GetAttr, SetAttr, Dir, Get, Put              

______________________________________________________

Math

 

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

______________________________________________________

Procedures

 

Call,  Declare, Function, End Function, Sub, End Sub, Exit, Global

______________________________________________________

Strings

 

Let, Len, InStr, Left, Mid, Asc, Chr, Right, LCase, Ucase, InStr, LTrim, RTrim, Trim, Option Compare, Len, Space, String, StrComp Format,

______________________________________________________

Variables and Constants

 

Dim, IsNull, IsNumeric,VarType, Const, IsDate, IsEmpty, IsNull, Option Explicit, Global, Static,

______________________________________________________

Error Trapping

 

On Error, Resume

______________________________________________________

Date/Time

 

Date, Now, Time, Timer

 

______________________________________________________

DDE

 

DDEInitiate, DDEExecute, DDETerminate

 

______________________________________________________

Arrays

 

Option Base, Option Explicit, Static, Dim, Global, Lbound, Ubound, Erase, ReDim

 

______________________________________________________

Miscellaneous

 

SendKeys, AppActivate, Shell, Beep, Rem, CreateObject, GetObject, Randomize

 

Data Types

 

Variable  Type Specifier                             usage

String         $                            Dim Str_Var As String

Integer       %                           Dim Int_Var As Integer

Long           &                            Dim Long_Var As Long

Single         !                             Dim Sing_Var As Single

Double        #                            Dim Dbl_Var As Double

Variant                                      Dim X As Any 

Boolean                                     Dim X As Boolean

Byte                                         Dim X As Byte

Object                                      Dim X As Object

Currency                                   (Not currently supported)

Operators

 

Arithmetic Operators

 

Operator             Function              Usage

      ^                Exponentiation              x = y^2

      -           Negation                  x = -2

      *          Multiplication       x% = 2 * 3

      /           division                   x = 10/2

   Mod                  Modulo                        x = y Mod z

     +           Addition                          x = 2 + 3

      -           Subtraction                   x = 6 - 4

 

*Arithmetic operators follow mathematical rules of precedence

* '+' or '&' can be used for string concatenation.

 

Operator Precedence

 

Operator       Description                      Order 

()                parenthesis                  highest                                                 

^                exponentiation                            

-                 unary minus                              

/,*              division/multplication                 

Mod             modulo                                     

+, -, &         addition, subtraction, concatenation

=, <>, <, >,<=,>=        relational                                    

Not              logical negation                                      

And             logical conjunction                                           

Or               logical disjunction

Xor              logical exclusion

Eqv             logical Equivalence

Imp             logical Implication                lowest

 

Relational Operators

 

Operator       Function                                    Usage  

<            Less than                                     x < Y

<=               Less than or equal to                          x <= Y                                   

=            Equals                                         x = Y                                 

>=               Greater than or equal to                     x >= Y

>            Greater than                       x > Y

<>               Not equal to                       x <> Y

 

Logical Operators

 

 

Operator Function                             Usage

 

Not         Logical Negation  If Not (x)

And        Logical And                  If (x> y) And (x < Z)

Or          Logical Or      if (x = y) Or (x = z)

 

Functions, Statements, Reserved words - Quick Reference

 

Abs, Access, Alias, And, Any

App, AppActivate, Asc, Atn, As    

Base, Beep, Begin, Binary, ByVal

Call, Case, ChDir, ChDrive, Choose, Chr, Const, Cos, CurDir,  CDbl, CInt, CLng, CSng, CStr, CVar,  CVDate,Close, CreateObject

Date, Day, Declare, Dim, Dir, Do...Loop,Dialog, DDEInitiate

DDEExecute, DateSerial, DateValue, Double  

Else, ElseIf, End, EndIf, EOF, Eqv, Erase, Err, Error

Exit, Exp, Explicit  

False, FileCopy, FileLen, Fix, For,

For...Next, Format, Function      

Get, GetAttr, GoTo, Global, Get Object

Hex, Hour

If...Then...Else...[End If], Imp, Input, InputBox, InStr, Int, Integer, Is, IsEmpty, IsNull, IsNumeric, IsDate

Kill

LBound, LCase, Left, Len, Let, LOF,Log, Long, Loop, LTrim Line Input  

Mid,Minute, MkDir, Mod, Month, MsgBox

Name, Next, Not, Now

Oct,On, Open, OKButton,Object, Option, Optional, Or, On Error

Print, Print #, Private, Put

Randomize, Rem, ReDim, RmDir, Rnd, Rtrim

Seek, SendKeys, Set, SetAttr, Second, Select, Shell, Sin, Sqr, Stop,Str, Sng, Single, Space, Static, Step, Stop, Str, String, Sub, StringComp

Tan,Text, TextBox, Time, Timer, TimeSerial, TimeVale, Then, Type, Trim, True, To, Type

UBound, UCase, Ucase, Until

Val, Variant, VarType

Write #, While, Weekday, Wend, With

Xor

Year