LBOUND(arrayname [,dimension])

Returns the smallest subscript in a given dimension of an array (Long).


arraynameThe name of the array (Variant).
dimension(Optional) The number of the dimension to use (Long).

REMARKS
* You cannot prefix this function with "VBA."
* If "dimension" = 1, then the first dimension of the array is used.
* If "dimension" = 2, then the second dimension of the array is used.
* If "dimension" is left blank, then 1 is used.
* The default lower bound for any dimension is either 0 or 1, depending on the "Option Base" statement.
* You can use the UBOUND function to find the upper limit of an array dimension.
* The equivalent .NET function is Microsoft.VisualBasic.Information.LBound
* For the Microsoft documentation refer to docs.microsoft.com

Dim avTemporary(1 To 100, 0 To 3, -3 To 4) As String 
LBound(avTemporary, 1) = 1
LBound(avTemporary, 2) = 0
LBound(avTemporary, 3) = -3
LBound(avTemporary) = 1

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top