title: Removing items from a userform combobox
body: <p>I have a couple of comboboxes which all have the same values - "", 1-12.  I'm trying to get it so that when a user selects an item, all of the other items disappear.  When a new item is selected, it repopulates the last item.</p>
  
  <p>This is what I have that far.</p>
  
  <pre><code>Private Old182 As String
  Private Sub ComboBox182_Change()
  Dim i
  Dim y
  If ComboBox182 &lt;&gt; Old182 Then
      For i = 182 To 193
          If i &lt;&gt; 182 Then
              If ComboBox182 &lt;&gt; Old182 Then
                  If ComboBox182 &lt;&gt; "" Then
                      Controls("ComboBox" &amp; i).RemoveItem ComboBox182.Value
                      If ComboBox182 &lt;&gt; "" Then
                          If Old182 &lt;&gt; "" Then
                              Controls("ComboBox" &amp; i).AddItem Old182
                          End If
                      End If
                  End If
              End If
          End If
      Next
  End If
  Old182 = ComboBox182.Value
  End Sub
  </code></pre>
  
  <p>My first run through, it will remove the first item.  Let's say for example I click 1.  It will remove (1).  If I click 2 it will remove (3).  I believe it does this because it is removing it by index value.  1 => "", (1).  Thus the array is "", 2, 3, etc.  2 => (3).  I'm sorry if that was poorly demoed.  Anyways, how can I get it so that it will remove the value from the array, and reset the array, or how can I remove a value from the array where it matches the value and not the index equaling the index?</p>
  
  <p><em><strong>Combobox is being populated via a range on my excel sheet</em></strong></p>