Name
LBound Function
Syntax
LBound(arrayname[,dimension])
-
arrayname Use: Required
Data Subtype: Any
The name of the array.
-
dimension Use: Optional
Data Subtype: Long
A number specifying the dimension of the array.
Return Value
A Variant of subtype Long.
Description
Determines the lower limit of a specified dimension of an array. The lower boundary is the smallest subscript you can access within the specified array.
Rules at a Glance
If dimension isn’t specified, 1 is
assumed. To determine the lower limit of the first dimension of an
array, set dimension to 1, 2 for the
second, and so on.
Programming Tips & Gotchas
This function has little use in VBScript, since you cannot control the lower bound of a VBScript array. Its value, which is 0, is invariable.
VBScript/VB & VBA Differences
Unlike VBA, there is no Option Base available in
VBScript, nor does VBScript support the To keyword
in the Dim, Private,
Public, and ReDim statements.
Therefore, all arrays will have a lower bound of 0.
See Also
| Array Function, UBound Function |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access