0

Possible Duplicate:
how to return the number of dimensions of a (Variant) variable passed to it in VBA

Is there any way of checking whether a VBA array is 2D or 1D? I cannot use isnumeric on lbound(x,2) because I get a subscript-out-of-range exception.

EDIT I also cannot use iserror(lbound(x,2))

Community
  • 1
  • 1
intrigued_66
  • 16,082
  • 51
  • 118
  • 189
  • http://stackoverflow.com/questions/6901991/how-to-return-the-number-of-dimensions-of-a-variant-variable-passed-to-it-in-v This is the only way – Larry Dec 17 '12 at 09:43
  • if the array was already populated you could try a `Join` with error checking. Only 1D array can be joined – brettdj Dec 17 '12 at 10:32

0 Answers0