title: Can you populate a ListBox with data entered within a ComboBox in VB?
body: <p>I have a program that has a number of fields that the user can input data into, and also a number of ComboBoxes that the user can select data from.</p>
  
  <p>My question is is it possible to use this selected data to populate a ListBox, or multiple ListBoxes (One for each field).</p>
  
  <p>I currently have this code that populates the ComboBoxes:</p>
  
  <pre><code>    Private Sub BusinessSalesPage_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      Me.ComboBox1.Items.AddRange(New String() {"0", "1-2", "3-9", "10-19", "20-49", "50-99", "100+"})
      Me.ComboBox2.Items.AddRange(New String() {"0", "0-1", "2-4", "5+"})
      Me.ComboBox3.Items.AddRange(New String() {"&lt;£1k", "£1k-£5k", "£5k-£10k", "£10k-£29k"})
      Me.ComboBox4.Items.AddRange(New String() {"1-10", "10-20", "20-50"})
      Me.ComboBox5.Items.AddRange(New String() {"&lt;£50k", "£50k-£100k", "£100k-£250k"})
      Me.ComboBox6.Items.AddRange(New String() {"Limited", "Partnership", "PLC"})
      Me.ComboBox7.Items.AddRange(New String() {"Established more than 5 years", "Established in 2007", "Established in 2008", "Established in 2009"})
      Me.ComboBox8.Items.AddRange(New String() {"CEO", "Deputy Head", "Manager", "Other"})
      Me.ComboBox9.Items.AddRange(New String() {"Marketing", "Energy Provider", "Retail", "IT"})
      Me.ComboBox10.Items.AddRange(New String() {"Post Code", "Account Number", "Phone Number", "Business Name"})
  End Sub
  </code></pre>
  
  <p>Yes I am new to VB, thanks in advance.</p>
  
  <p>It might be worth noting that I am using TabPages to navigate through the form.</p>
  
  <p>Edit:</p>
  
  <p>I just want to take user input from one textBox and display it into a ListBox
  Here is what I have so far:</p>
  
  <pre><code>    Dim postcode As String = String.Empty
  
      postcode = TextBox16.Text
  
      If postcode = "" Then
          MessageBox.Show("Please enter a postcode")
      Else
  
      End If
  </code></pre>
  
  <p>Not sure what needs to go into ElseIf to make the inout go into ListBox1</p>