Can you please tell me, how to find the dimension of an array. I got a variant array as a return parameter from a function. I want to know whether the returned array is Single dimension or 2 dimension array.
Private Sub CheckArray()
Dim iX As Long
Dim iY As Long
iX = 0
iY = 1
Do While 1
On Error GoTo ErrTrap
iX = UBound(myArr, iY)
iY = iY + 1
Loop
Exit Sub
ErrTrap:
MsgBox "There is " & CStr(iY - 1) & " Dimensions"
End Sub
Hope this helps Anything is possible, the problem is I only have one lifetime.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.