Syntax
Public Function ArraySize(ary As Variant) As Integer
Description
This function is used to return the number of elements in given array.
Parameters
Key | Description |
Ary | Array to get size, value of type Variant. |
Return value
Return the size in a selected array as integer value.
Sample
Public Sub main () Dim Arr (5) Arr (1) = 1 Arr (2) = 2 Arr (3) = 4 Arr (4) = 6 Dim Size Size = ArraySize (Arr) AlertMessage (Size) End sub
See Also