dim c as long ,a(2,3,4,5) as long
c=UBound(A,1)
c=UBound(A,2)
c=UBound(A,3)
c=UBound(A,4)
c=UBound(A,5)
...........
...........
...........直到出错为止,就知道了
c=UBound(A,1)
c=UBound(A,2)
c=UBound(A,3)
c=UBound(A,4)
c=UBound(A,5)
...........
...........
...........直到出错为止,就知道了
Dim i As Long, c As Long
i = 0
On Error GoTo error
Do
c = UBound(DArray, i + 1)
i = i + 1
Loop
error:
PleaseTellMeHowManyDimensionInThisArray = i
End Function