Returns the lower bound of an array's dimension
Syntax
Usage
result = LBound( array [, dimension ] )
Parameters
array
an array of any type
dimension
the dimension to get lower bound of
Return Value
Returns the lower bound of an array's dimension.
Description
LBound returns the lowest value that can be used as an index into a particular dimension of an array.
Array dimensions are numbered from one (1) to n, where n is the total number of dimensions. If dimension is not specified, LBound will return the lower bound of the first dimension. If dimension is less than one (1) or greater than the total number of dimensions (n) in the array, the result is undefined.
Example
Dim array(-10 To 10, 5 To 15, 1 To 2) As Integer
Print LBound(array) 'returns -10
Print LBound(array, 2) 'returns 5
Print LBound(array, 3) 'returns 1
See also