title: vba error : this key is already associated with an element of this collection
body: <p>i am using two combo-box in my sheet and item list of second combo-box based on the value selected in  first combo-box  and i am using following code for that but it gives the error "this key is already associated with an element of this collection" on "oDictionary.Add cel.value, 0" line of code .</p>
  
  <pre><code>    Set secondItem = Sheet2.Range("b1:b30")
      Set oDictionary = CreateObject("Scripting.Dictionary")
      Sheet3.ComboBox2.Clear
      With Sheet3.ComboBox2
      For Each cel In secondItem
      If ComboBox1.value = cel.Offset(, -1).value Then
  
          oDictionary.Add cel.value, 0
          ComboBox2.AddItem (cel.value)
  
      End If
  Next cel
  End With
  </code></pre>
  
  <p>what is the solution of this issue .....</p>
  
  <p>thanks in advance ......   </p>