1. Call ToObject passing the this value as the argument.
2. If Result(1) is not a VBArray instance, raise a TypeError exception.
3. Get the value of the [[SArray]] property of Result(1).
4. Return the Number that is the number of dimensions of the COM SAFEARRAY referenced by Result(3).