VBA Parameters

Most of the Visual Basic functions require that you supply one or more parameters. Parameters define what to operate on and how to perform the function. Table 21 lists the parameter types and how to supply a value for each type:

Table 21. VBA Parameters

Parameter TypeValues

Text

A word or phrase or name in quotes. For example:

"Essbase" "[Book2.xls]Sheet1"

Boolean

True

False

Range Object

A cell, row or column, one or more selections of cells, or a three-dimensional range address, surrounded by quotes. For example:

RANGE("A1")

RANGE("A1:B2")

RANGE("A1:B2")

RANGE("G:G,I:I,K:K")

RANGE("A1:B5,C1:C10,D5:L8")

RANGE("Sheet1!C3:R20,Sheet2!C3:R20")

Number

A number without quotes and without commas. For example:

1 2.5 50000

List of Strings

A list of Text values, separated by commas. For example:

"Qtr1", "Actual", "Oregon"

Constant

A predefined constant from ESSXLVBA.TXT.

Default Value

Null

Empty

If you do not want to specify a value for a parameter, you can use Null or Empty. Every parameter has a default value or behavior that the function uses if you specify Null or Empty. See the description of each function for information on the default values of each parameter.