Home » Arrays, Collections, Lists » How to find out the number of dimensions of the given array
How to find out the number of dimensions of the given array
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 | 'Arrays, Collections, Lists - How to find out the number of dimensions of the given array 'This routine returns the number of dimensions of the array passed as 'an argument, or 0 if it isn't an array. Function NumberOfDims(arr As Variant) As Integer Dim dummy As Long On Error Resume Next Do dummy = UBound(arr, NumberOfDims + 1) If Err Then Exit Do NumberOfDims = NumberOfDims + 1 Loop End Function |
Related posts:
- How to sum all the elements in an two dimensional array
- How to check whether an item exists in a collection
- How to sum all the elements in an array
- How to evaluate the total number of elements in a two dimensional array
- How to delete an item in an array
- How to store all the selected items in a ListBox in an array
- How to insert an item in an array
- How to Scramble the order of elements in an array.
- How to resize an array without losing its contents
- How to get Dimensions of an image
Enjoy this article?
Filed under: Arrays, Collections, Lists
Leave a comment
Sponsors
Link Back to us
Donations
If you are benefited from this site, please donate a small contribution to us. It will help to maintain this site better.