VBA Parameters

Most VBA functions require you to supply values for one or more parameters. Table 2-1 lists the parameter types and the valid values for each type:

Table 2-1 VBA Parameters

Parameter Value
Text A word or phrase or name in quotation marks. For example:
  • "Smart View"

  • "[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 quotation marks. For example:
  • RANGE("A1")

  • 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 quotation marks 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 smartview.bas
Default value
  • Null

  • Empty

Note:

Many parameters have default values or behavior that the function uses if you specify Null or Empty. If you do not specify a value for such parameters, use Null or Empty. See the description of each function for default values of such parameters.