Funzione LBound
Restituisce il limite inferiore di una matrice.
Sintassi:
LBound (NomeMatrice [, Dimensione])
Valore restituito:
Integer
Parametri:
NomeMatrice: nome della matrice per la quale desiderate restituire la dimensione massima (Ubound) o minima (LBound).
[Dimension]: numero intero che specifica per quale dimensione deve essere restituito il limite superiore (Ubound) o inferiore (LBound). Se non viene specificato un valore, viene presa in considerazione la prima dimensione.
Esempio:
Sub ExampleUboundLbound
Dim sVar(10 To 20) As String
Print LBound(sVar())
Print UBound(sVar())
End Sub
Sub ExampleUboundLbound2
Dim sVar(10 To 20,5 To 70) As String
Print LBound(sVar()) ' Restituisce 10
Print UBound(sVar()) ' Restituisce 20
Print LBound(sVar(),2) ' Restituisce 5
Print UBound(sVar(),2) ' Restituisce 70
End Sub