title: Find indexof Object in ArrayList
body: <p>I have a simple bit of test code:</p>
  
  <pre><code>Sub test()
      Dim testList As Object
      Set testList = CreateObject("System.Collections.ArrayList")
      testList.Add Range("a1")
      Debug.Print testList.IndexOf(Range("a1"))
  End Sub
  </code></pre>
  
  <p>Which returns an error rather than the index of the object in the list. Why is this, and if instead of adding a <code>Range</code>, I add a custom <code>myClass</code>, then what must <code>myClass</code> <code>Implement</code> to get this to work? Or is it not possible to lookup an object in an <code>ArrayList</code>?</p>