LBOUND(arrayname [,dimension]) |
Returns the smallest subscript in a given dimension of an array (Long). |
arrayname | The 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 * This function is not available in Access. * For the Microsoft documentation refer to docs.microsoft.com |
Dim avTemporary(1 To 100, 0 To 3, -3 To 4) As String
Debug.Print LBound(avTemporary) '= 1
Debug.Print LBound(avTemporary, 1) '= 1
Debug.Print LBound(avTemporary, 2) '= 0
Debug.Print LBound(avTemporary, 3) '= -3
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top