Need help with combobox output

  • Thread starter Steven R. Solorio
  • Start date
S

Steven R. Solorio

I have a combobox that is being filled by data located on sheet3. The
combobox is setup for 3 columns. I would like to have the combobox
display only the values in column 1 and in two other textboxes be able
to show the values of column 2 and column 3.

I am able to get the combobox to display fine, and one of the textboxes
to display it's column. When I try to activate the second textbox, it
won't work.

The code that I am trying to use is:



Private Sub cboCustomer_Change()
cboCustomer.ColumnCount = 3
cboCustomer.BoundColumn = 2
txtContact.Text = cboCustomer.Value

cboCustomer.BoundColumn = 3
txtPhone.Text = cboCustomer.Value
End Sub

I would appreciate any direction you might suggest.
TIA
Steve
 
V

Vasant Nanavati

All you need is:

Private Sub cboCustomerList_Change()
txtContact = cboCustomer.List(, 1)
txtPhone = cboCustomer.List(, 2)
End Sub
 
S

Steven R. Solorio

Thank you for responding so quickly. I will try this as soon as I can
and I will let you know what happened.

Thanks,
Steve
 
S

Steven R. Solorio

Dear Vasant,

I wanted to let you know that the code you posted worked like a charm.
You make it look easy. Again, many thanks for your help.

Steve
 
V

Vasant Nanavati

Any time, Steve!

--

Vasant

Steven R. Solorio said:
Dear Vasant,

I wanted to let you know that the code you posted worked like a charm.
You make it look easy. Again, many thanks for your help.

Steve
 

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