Question:
Which function returns the object type?
Solution:
The function is TypeName().
Example of script:
Dim ArrayVar(4), MyType
NullVar = Null
MyType = TypeName(“VBScript”) ‘ Returns “String”.
MyType = TypeName(4) ‘ Returns “Integer”.
MyType = TypeName(37.50) ‘ Returns “Double”.
MyType = TypeName(NullVar) ‘ Returns “Null”.
MyType = TypeName(ArrayVar) ‘ Returns “Variant()”.