IsObject Function

Syntax

IsObject(expr)

Group

Variable Info

Description

Return the True if expr contains an object reference.

Parameters

Parameters Description
var If expr is an object reference return True.

Example


Sub Main
    Dim X As Variant
    X = 1
    Debug.Print IsObject(X) 'False
    X = "1"
    Debug.Print IsObject(X) 'False
    Set X = Nothing
    Debug.Print IsObject(X) 'True
End Sub

See also

TypeName, VarType