[thelist] VBScript Arrays: Can I Determine the Number of Dimensions via Script?

James Aylard webmaster at equilon-mrc.com
Wed May 23 12:21:39 CDT 2001

    I am working with VBScript arrays, and can't see any way (looking
through Microsoft's VBScript 5.5 Reference) to determine by script how many
dimensions an array has. Please note, I am not talking about how many values
are stored in the array, but how many dimensions the array contains.
    The only way that comes to mind is to set On Error Resume Next, create a
loop that UBounds successive dimensions of an array, and when an error is
generated (because a given dimension doesn't exist) to exit the loop. That
seems very inelegant, however.
    Any suggestions?

James Aylard

More information about the thelist mailing list