Microsoft Office Tutorials and References
In Depth Information
Chapter 7. Built-in Functions and Statements
Chapter 7. Built-in Functions and Statements
VBA has a large number of built-in functions and statements. For possible reference, Table 7-1
shows the VBA functions, and Table 7-2 s hows the statements. We will take a look at a few of the
more commonly used functions and statements for programming Excel VBA in this chapter and
Chapter 8 .
To help simplify the exposition, we will follow Microsoft's lead and use square brackets to
indicate optional parameters. Thus, for instance, the second parameter in the following procedure
is optional:
Sub ChangeFormat( FontName [, FontSize ])
Note that we have also omitted the data type declarations, which will be discussed separately.
Table 7-1. V BA Functions [1]
Abs
DoEvents
IsEmpty
Right
Array
Environ
IsError
RightB
Asc
EOF
IsMissing
Rnd
AscB
Error
IsNull
Round*
AscW
Exp
IsNumeric
RTrim
Atn
FileAttr
IsObject
Second
CallByName*
FileDateTime
Join*
Seek
Cbool
FileLen
Lbound
Sgn
Cbyte
Filter*
Lcase
Shell
Ccur
Fix
Left
Sin
Cdate
Format
LeftB
SLN
CDbl
FormatCurrency*
Len
Space
Cdec
FormatDateTime*
LenB
Spc
Choose
FormatNumber*
LoadPicture
Split*
Chr
FormatPercent*
Loc
Sqr
ChrB
FreeFile
LOF
Str
ChrW
FV
Log
StrComp
Cint
GetAllSettings
Ltrim
StrConv
CLng
GetAttr
Mid
String
Command
GetAutoServerSettings
MidB
StrReverse*
Cos
GetObject
Minute
Switch
CreateObject
GetSetting
MIRR
SYD
CSng
Hex
Month
Tab
CStr
Hour
MonthName*
Tan
CurDir
Iif
MsgBox
Time
Cvar
IMEStatus
Now
Timer
CVDate
Input
Nper
TimeSerial
CVErr
InputB
NPV
TimeValue
Date
InputBox
Oct
Trim
DateAdd
InStr
Partition
TypeName
DateDiff
InStrB
Pmt
UBound
 
 
Search JabSto ::




Custom Search