To specify the return value of a formula a value must be assigned to the variable formula at the end of each formula. Otherwise, the formula is erroneous.
Dim x As Number x = 5 formula = x
Dim x ' single variable without defined type Dim x () ' array variable without defined type Dim x As //(type)// [range] ' single variable with type (type), optional a range of type (type) Dim x () As //(type)// [range] ' array variable with type (type), optional an array of ranges of type (type)
Declares a variable of type (type). The keywords Local, Global, and Shared can be used instead of Dim to select the scope of this variable.
The following declarations are possible:
Local //(type)//Var [range] [array] x
Declares a variable of type (type). The keywords Global and Shared can be used instead of Local to select the scope of this variable. With the optional flags [range] and [array] you can create ranges or array of the selected type and scope. Arrays of range values are possible as well.
The following declarations are possible: