2.1.19 [ECMA-262-1999] Section 9.9, ToObject

V0030:

The operator ToObject converts its argument to a value of type Object according to the following table:

Input Type

Result

Undefined

Throw a TypeError exception.

Null

Throw a TypeError exception.

Boolean

Create a new Boolean object whose [[value]] property is set to the value of the boolean. See [ECMA-262-1999] section 15.6 for a description of Boolean objects.

Number

Create a new Number object whose [[value]] property is set to the value of the number. See [ECMA-262-1999] section 15.7 for a description of Number objects.

String

Create a new String object whose [[value]] property is set to the value of the string. See [ECMA-262-1999] section 15.5 for a description of String objects.

__SafeArray__

__Create a new VBArray object as if by executing the ECMAScript expression: new VBArray(argument), where argument is the SafeArray value. See [MS-ES3EX] section VBArray Objects for a description of VBArray objects.__

__VarDate__

__Throw a TypeError exception.__

Object

The result is the input argument (no conversion).