title: Dynamically add Items to Combobox VB.NET
body: <p>I have 2 combobox in windows application. I want to programmatically add Items to second combobox based on what is selected in the first combobox.</p>
  
  <p>This is what I do in the selected index change of the combobox:</p>
  
  <pre><code>Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
      Try
          If ComboBox1.SelectedIndex = 0 Then
              ComboBox2.Items.Add("MM")
              ComboBox2.Items.Add("PP")
          ElseIf ComboBox1.SelectedIndex = 1 Then
              ComboBox2.Items.Add("SMS")
          ElseIf ComboBox1.SelectedIndex = 2 Then
              ComboBox2.Items.Add("MMS")
              ComboBox2.Items.Add("SSSS")
          End If
  
      Catch ex As Exception
  
      End Try
  End Sub
  </code></pre>
  
  <p>It works fine, however, if I keep selecting different items it's keep adding the value over and over. I would like to add those values only once.</p>
  
  <p>Also, when I add an item I would prefer to add an ID with the item description. I tried:</p>
  
  <pre><code>ComboBox2.Items.Add("SSSS", "1")
  </code></pre>
  
  <p>It seems that it's not working.</p>
  
  <p>Any suggestions?</p>