0

In VBA, is comparing two objects with the Is operator the same as comparing their ObjPtr values?

That is, is this

obj1 Is obj2

... the same as this?

ObjPtr(obj1) = ObjPtr(obj2)
Benjamin W.
  • 38,596
  • 16
  • 96
  • 104
Hao Zhang
  • 203
  • 2
  • 7
  • https://stackoverflow.com/questions/11254401/vba-how-to-test-for-object-equality-whether-two-variables-reference-the-same-o/11254505 – Tim Williams Jul 26 '17 at 15:51
  • Yes they should be the same. Did you encounter cases where they're not? – A.S.H Jul 26 '17 at 16:09
  • Possible duplicate of [VBA: how to test for object equality (whether two variables reference the same object)](https://stackoverflow.com/questions/11254401/vba-how-to-test-for-object-equality-whether-two-variables-reference-the-same-o) – abagshaw Jul 26 '17 at 17:25

0 Answers0