Is there a way to find out how many dimensions an array has? LBound and
UBound tell you how many elements are within a given dimension but I want to
know how many dimensions there are in an array.
Thanks
ben
dim foo(1,1,1)
on error resume next
for n = 0 to 999
x = ubound(foo,n+1)
if err then exit for
next
on error goto 0
msgbox "foo has " & n & " dimensions"
--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--
"Ben" <bbsha...@hotmail.com> wrote in message news:Oen8ZJwCBHA.408@tkmsftngp05...