title: VBA and collection - need set a instance to nothing before add to collection?
body: <p>I'm trying to add an object twice with modified values ​​for a collection but at the end of the collection contains the same values ​​for the two items. Where am I wrong?</p>
  
  <pre><code>Private Sub MySub()
      Dim ClientList As Collection
      Set ClientList = New Collection
  
      Dim Inst1 As Client
  
      Set Inst1 = New Client
  
      Inst1.Code = 1
      Inst1.Name = "First Client"
      'Adding first client
      ClientList.Add Inst1 
  
      Inst1.Code = 2
      Inst1.Name = "Second Client"
      'Adding second client
      ClientList.Add Inst1
  
      Set Inst1 = ClientList(1)
      MsgBox Inst1.Name 'Show "Second Client"   
  
      Set Inst1 = ClientList(2)
      MsgBox Inst1.Name 'Show "Second Client" too   
  
  
  End Sub
  </code></pre>