ojosVerdes
Technical User
Is there a way to determine how many dimensions an array has?
Thanks in advance.
Ed
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function NumberOfDimensions(ivntArray As Variant) As Integer
Dim dintDimension As Integer
Dim dlngUpperBound As Long
On Error Resume Next
For dintDimension = 1 To 65
dlngUpperBound = UBound(ivntArray, dintDimension)
If Err.Number <> 0 Then Exit For
Next
NumberOfDimensions = dintDimension - 1
End Function