Method: IsObject for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: IsObject for VBS
Method: IsObject for VBS
Specifies whether an expression refers to a valid automation object.
vIsObject = Object.IsObject(identifier)
Object | VBS Object with this method. You do not need to specify this object. |
identifier | Variant Specifies any expression. |
vIsObject | Variant The IsObject method returns True if the expression refers to a valid automation object. Otherwise the method returns False. |
The following example checks whether a variable contains a valid automation object:
Dim MyInt, MyObject Set MyObject = View.ActiveSheet Call MsgBox(IsObject(MyObject)) ' Returns True Call MsgBox(IsObject(MyInt)) ' Returns False