title: Dynamically populate second Combobox with variable from first ComboBox
body: <p>I am stuck with a problem with ComboBox in Excel VBA. Any help is highly appreciated.
  This is what I am trying to do:</p>
  
  <ul>
  <li>In a UserForm, user chooses an input from a first ComboBox named "ComboBox_groesse" (regular ComboBox with a fixed RowSource. Inputs are numbers)</li>
  <li>When the DropButton of a second ComboBox named "ComboBox_config_1" is clicked, this ComboBox will be populate with the values from a NamedRange "KonfiRange_1_1" that is equal to the value of the chosen ComboBox_groesse.value</li>
  <li>the NamedRange is in a table that has 2 columns. The first column is the NamedRange with numbers, the second with text.</li>
  <li>I would like the correspondent text to be appeared in the second ComboBox together with the values that are equal to ComboBox_groesse.value</li>
  </ul>
  
  <p>I have written the codes below but I am getting a blank ComboBox_config_1. Could any one please help? Thanks in advance!</p>
  
  <pre><code> Private Sub ComboBox_config_1_DropButtonClick()
  
      Dim teil As Range
  
      For Each teil In Tabelle1.Range("KonfiRange_1_1")
  
      If teil.Value = ComboBox_groesse.Value Then
  
          With Me.ComboBox_config_1
  
          .AddItem teil.Value
  
          End With
  
      End If
      Next teil
  </code></pre>