Chapter 12. Built-in Functions and Statements

VBA has a large number of built-in functions and statements. For possible reference, Table 12.1 shows the VBA functions, and Table 12.2 shows the statements. We will take a look at a few of the more commonly used functions and statements in this chapter and the next.

Table 12-1. VBA Functions

Abs

DDB

IsError

RightB

Array

Dir

IsMissing

Rnd

Asc

DoEvents

IsNull

RTrim

AscB

Environ

IsNumeric

Second

AscW

EOF

IsObject

Seek

Atn

Error

Lbound

Sgn

CBool

Exp

Lcase

Shell

CByte

FileAttr

Left

Sin

CCur

FileDateTime

LeftB

SLN

CDate

FileLen

Len

Space

CDbl

Fix

LenB

Spc

CDec

Format

LoadPicture

Sqr

Choose

FreeFile

Loc

Str

Chr

FV

LOF

StrComp

ChrB

GetAllSettings

Log

StrConv

ChrW

GetAttr

Ltrim

String

CInt

GetAutoServerSettings

Mid

Switch

CLng

GetObject

MidB

SYD

Command

GetSetting

Minute

Tab

Cos

Hex

MIRR

Tan

CreateObject

Hour

Month

Time

CSng

Iif

MsgBox

Timer

CStr

IMEStatus

Now

TimeSerial

CurDir

Input

Nper

TimeValue

Cvar

InputB

NPV

Trim

CVDate

InputBox

Oct

TypeName

CVErr

InStr

Partition

UBound

Date

InStrB

Pmt

UCase

DateAdd

Int

PPmt

Val

DateDiff

Ipmt

PV

VarType

DatePart

IRR

QBColor

Weekday

DateSerial

IsArray

Rate

Year

DateValue

IsDate

RGB

 

Day

IsEmpty

Right

 

Table 12-2. VBA Statements

AppActivate

Do...Loop

Mid

Reset

Beep

End

MidB

Resume

Call

Enum

MkDir

Return

ChDir

Erase

Name

RmDir

ChDrive

Error

On Error

Get Access Database Design and Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.