IsObject Function |
No
IsObject(varname)
varname
Use: Required
Data Type: Any
Name of the variable to be evaluated.
Boolean (True or False).
Indicates if a variable contains a reference to an object—in other words, if it's an object variable.
If the variable passed to IsObject references or has referenced an object, even if its value is Is Nothing, True is returned; otherwise, IsObject returns False.
IsObject doesn't validate the reference being held by an object variable; it simply determines if the variable has been declared as an object or as an instance of a valid class. To insure that an object reference is valid, you can use the syntax Is Nothing, as shown in this code snippet:
If objVar is Nothing Then ... End if
IsObject is simply a "convenience" function that is roughly equivalent to the following Visual Basic user-defined function:
Private Function IsObject(varObj As Variant) As Boolean If VarType(varObj) = vbObject Then IsObject = True Else IsObject = False End If End Function
3.144.255.55