What is the syntax to return the last index of an array?

LBound(<arrayname>, dimension)
‘dimension refers to dimension of array ie.1D,2D,3D; optional parameter
‘examples
Dim myArray(4,5) As Variant
MsgBox (UBound(myarray,2)) ‘returns 6

Also solves: What is the syntax to return the size of an array?

Advertisements