0

I created a combobox with certain values in it, I need to read the selection from the combobox into a text box. Any suggestions to help me get started?

3
Contributors
3
Replies
18
Views
4 Years
Discussion Span
Last Post by Spacecrawler
0

You begin your research reading the methods and properties from msdn (link) Look though the list of properties and method to find the one that returns the text from the selection field of the combobox. Then all you have to do is copy the text into a textbox (a simple assignment)

I could just tell you, but I won't because you need to learn how to find out those things for yourself. It's part of the learning process.

0

You should look at using the ComboBox_SelectedIndexChanged event.

This can be handled like so:

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ComboBox1.SelectedIndexChanged
    Try
        TextBox1.Text = ComboBox1.SelectedValue
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
0

I wasn't looking for the code itself. I found part of the code I need, I just need a little push, thank you!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.