I'm using Ubound to find the size of an array that I'm passed in a function, but I can't figure out how to determine the number of dimensions.
AFAIK...
1 Vartype returns the value vbArray to tell me it's an array, but no extra info to tell me the number of dimensions. For a 2 dimensional array, VARTYPE(myarray) < 2 * vbArray
2 myarray(1) is an integer for a 1 dimensional array, but it is not a valid call when there are more than 1 dimension. i was trying to check whether vartype(myarray(1)) was vbArray, but it crashes when there's more than 1 dimension.
Can anyone help with this? I can't believe there isn't a function which returns the number of dimensions.
AFAIK...
1 Vartype returns the value vbArray to tell me it's an array, but no extra info to tell me the number of dimensions. For a 2 dimensional array, VARTYPE(myarray) < 2 * vbArray
2 myarray(1) is an integer for a 1 dimensional array, but it is not a valid call when there are more than 1 dimension. i was trying to check whether vartype(myarray(1)) was vbArray, but it crashes when there's more than 1 dimension.
Can anyone help with this? I can't believe there isn't a function which returns the number of dimensions.