Академический Документы
Профессиональный Документы
Культура Документы
Functions Reference
This appendix contains a complete listing of all Visual Basic for Applications (VBA) statements
and built-in functions. For details, consult Excels online help.
There are no new VBA statements in Excel 2010.
Action
AppActivate
Beep
Call
ChDir
ChDrive
Close
Const
Date
Declare
DefBool
Sets the default data type to Boolean for variables that begin with specified letters
DefByte
Sets the default data type to Byte for variables that begin with specified letters
DefCur
Sets the default data type to Currency for variables that begin with specified
letters
DefDate
Sets the default data type to Date for variables that begin with specified letters
DefDec
Sets the default data type to Decimal for variables that begin with specified letters
continued
977
978
Action
DefDbl
Sets the default data type to Double for variables that begin with specified letters
DefInt
Sets the default data type to Integer for variables that begin with specified letters
DefLng
Sets the default data type to Long for variables that begin with specified letters
DefObj
Sets the default data type to Object for variables that begin with specified letters
DefSng
Sets the default data type to Single for variables that begin with specified letters
DefStr
Sets the default data type to String for variables that begin with specified letters
DefVar
Sets the default data type to Variant for variables that begin with specified letters
DeleteSetting
Deletes a section or key setting from an applications entry in the Windows Registry
Dim
Do-Loop
End
Used by itself, exits the program; also used to end a block of statements that
begin with If, With, Sub, Function, Property, Type, or Select
Enum
Erase
Re-initializes an array
Error
Event
Exit Do
Exit For
Exit Function
Exit Property
Exit Sub
FileCopy
Copies a file
For Each-Next
For-Next
Function
Get
GoSub...Return
GoTo
If-Then-Else
Implements
Input #
Kill
Let
Line Input #
Load
979
Statement
Action
Lock...Unlock
Lset
Mid
MkDir
Name
On Error
On...GoSub
On...GoTo
Open
Option Base
Option Compare
Option Explicit
Option Private
Print #
Private
Property Get
Property Let
Property Set
Public
Put
RaiseEvent
Randomize
ReDim
Rem
Reset
Resume
RmDir
RSet
SaveSetting
Seek
Select Case
SendKeys
Set
SetAttr
Static
Declares variables at the procedure level so that the variables retain their values
as long as the code is running
continued
980
Action
Stop
Sub
Time
Type
Unload
While...Wend
Width #
With
Write #
The WorksheetFunction object was introduced in Excel 97. For compatibility with earlier versions of Excel, you can omit the reference to the WorksheetFunction object and write an
instruction such as the following:
Deg = Application.Degrees(3.14)
Action
Abs
Array
Asc
Atn
Function
Action
CallByName
CBool
CByte
CCur
CDate
CDbl
CDec
Choose
Chr
CInt
CLng
Cos
CreateObject
CSng
CStr
CurDir
CVar
981
CVDate
CVErr
Date
DateAdd
DateDiff
DatePart
DateSerial
DateValue
Day
DDB
Dir
DoEvents
Environ
EOF
Error
Exp
FileAttr
FileDateTime
Returns the date and time when a file was last modified
continued
982
Action
FileLen
Filter
Fix
Format
FormatCurrency
FormatDateTime
FormatNumber
FormatPercent
FreeFile
Returns the next available file number when working with text files
FV
GetAllSettings
GetAttr
GetObject
GetSetting
Returns a specific setting from the applications entry in the Windows Registry
Hex
Hour
IIf
Input
InputBox
InStr
InStrRev
Returns the position of a string within another string from the end of the string
Int
IPmt
IRR
IsArray
IsDate
IsEmpty
IsError
IsMissing
IsNull
IsNumeric
IsObject
Join
LBound
983
Function
Action
LCase
Left
Len
Loc
LOF
Log
LTrim
Mid
Minute
MIRR
Returns the modified internal rate of return for a series of periodic cash flows
Month
MonthName
MsgBox
Now
NPer
NPV
Oct
Partition
Pmt
Ppmt
PV
QBColor
Rate
Replace
RGB
Right
Rnd
Round
RTrim
Second
Seek
Sgn
Shell
Sin
SLN
984
Action
Space
Spc
Split
Sqr
Str
StrComp
StrConv
String
StrReverse
Switch
Evaluates a list of Boolean expressions and returns a value associated with the first
True expression
SYD
Tab
Tan
Time
Timer
TimeSerial
TimeValue
Trim
TypeName
UBound
UCase
Val
Returns the number formed from any initial numeric characters of a string
VarType
Weekday
WeekdayName
Year