Combobox selection to fill in textboxes

T

Tdungate

I have a combobox that I want to select a value which will then fill
textboxes with values from the column 2, column3 , etc.

Column 1 Column 2 Column 3
Last Name First Name Nickname
Dungate Deborah Deb
Dungate Dominique Dom

I should get: Last Name: Dungate
First Name: Deborah
Nickname: Dom

I am using:
Private Sub ComboBox1_Change()
TextBox50.Value = Combobox1.Column(1)
TextBox51.Value = Combobox1.Column(2)
End Sub

I get the error: "Could not get the column property. Invalid Property"

Can someone help me with the error.

What code do I sue
 
J

JLGWhiz

I believe you will need to use the List property of the combobox.

TextBox50.Value = Combobox1.List(0, 1) 'first row, first col of CB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top