Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi column combobox (excel97)

Status
Not open for further replies.

Pcfred

Technical User
Jan 15, 2002
54
US
I have a multi column combobox with 3 columns on a form. When I select the dropdown box I can see all 3 columns but when I select an entry the result in the combobox only shows the first column. How can I get it to display all 3 columns?

thx
pcfred
 
I think the only way to do this is to use three text boxes and populate them with the individual column values.
Code:
Private Sub ComboBox1_Change()
  With ComboBox1
    TextBox1.Text = .List(.ListIndex, 0)
    TextBox2.Text = .List(.ListIndex, 1)
    TextBox3.Text = .List(.ListIndex, 2)
  End With
End Sub
 
In the form design mode activate the combo box. In the properties window make sure you have defined the column widths ie: 90; 100; 150 with the numbers listed being the width of the columns separates by semi-colons. Also, be sure that the listwidth property is as large as the sum of the 3 columns.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top