title: VBA equivalent to List of Class and how to code it (array? Collection?)
body: <p>I'm trying to do something in VBA that I've previously done something similar to in C# with a list of class (not that I'm any expert in C# either). Simplified idea version...</p>
  
  <pre><code>Public Class ResultLine
  {
    public string VariableThing1 {get:set}
    public string VariableThing2 {get:set}
  }
  Public void Main
  {
    List&lt;ResultLine&gt; AllTheResults = new List&lt;ResultLine&gt;();
    Do while *LogicStuff*
       Mode = *Current Mode Found*
       Result1 = *ThingFoundLogic*
       Result2 = *OtherThingFoundLogic*
       If *a ResultLine exists in AllTheResults for that Mode (using
                                AlltheResults.Find or AlltheResults.Contains)*
       {
          *Add something to that pre-existing ResultLine - not defo sure 
           how to do this in C# either, but should be able to google that 
           and I want VBA anyway*
       } 
       else
       {
             AllTheResults.Add(NewResultLine() {VariableThing1 = 
                                         Result1, VariableThing2 = Result2});
       }
    Loop
  </code></pre>
  
  <p>What's the best way to do that in VBA though as there's no List function? An array I don't know what size it'll be until I'm finished. How about a collection? Is that closest to List? As noted I want to be able to "find" within it as sometimes I want to sometimes add stuff to a pre-existing "ResultLine" in "AllTheResults", other times I want to create the new ResultLine. </p>
  
  <p>I'm a pretty inexperienced programmer so hopefully this isn't too dumb a question! Googling didn't seem to help much though. Thanks!</p>