Is

This operator is used to compare two object reference variables.

Syntax

result = object1 Is object2

Parameters

result
Any numeric variable.
object1
Any object name.
object2
Any object name.

Remarks

If object1 and object2 both refer to the same object, result is True; if they do not, result is False.

Two variables can be made to refer to the same object.The following code example shows that A and B refer to the same object.

Set A = B

The following code example shows that A and B refer to the same object as C.

Set A = C
Set B = C