VBScript LBound Function
Complete VBScript Reference Manual
The LBound function returns the smallest subscript for a given dimension of an array.
**Note:** The LBound of any dimension is always 0.
**Tip:** The LBound function is used together with the UBound function to determine the size of an array.
Syntax
LBound(arrayname[,dimension])
| Parameters | Description |
|---|---|
| arrayname | Required. The name of the array variable. |
| dimension | Optional. Which dimension's lower bound to return. 1 = first dimension, 2 = second dimension, and so on. The default is 1. |
Example
Example 1
The example above produces the following output:
0
6
Try it »
Example 2
A two-dimensional array:
The example above produces the following output:
0
2
0
3
Try it »
Complete VBScript Reference Manual