title: VBA: how to test for object equality (whether two variables reference the same object)
body: <p>What is the operator or function to test whether two variables of the same custom object type refer to the same object? I've tried</p>
  
  <pre><code>If myObject = yourObject Then
  </code></pre>
  
  <p>But get a runtime error 438 object doesn't support this property or method. I'm guessing that's telling me to override the '=' operator to test if all the fields of the two objects have the same value. But what I want is to test whether they are the same object.</p>