We help IT Professionals succeed at work.
Get Started

Using a combobox in vb.net

Last Modified: 2013-11-26
Trying to use a ComboBox in vb.net, but I get the odd behavior the as soon as the dropdown is lowered, the box makes the first selection of the list the selected item ?

Its like it tries to match the current selection ?
Me.ComboBox1.Text = "B"
Make the above change and then pull down the list ?


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim i As Integer

        For i = 0 To 5
            Me.ComboBox1.Items.Add(Chr(65 + i) & "- " & Format(i, "00"))
        Me.ComboBox1.Text = "A"

    End Sub

Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 33 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE