Hi,
I have this simple code which would display 2 columns of data in a combobox. However, when I click a selection only the data in the first column is displayed. I there a way to display the second column as well? Example, when I select "1 String 1" from the dropdown list I want to see "1 String 1" in the combobox value.
I have this simple code which would display 2 columns of data in a combobox. However, when I click a selection only the data in the first column is displayed. I there a way to display the second column as well? Example, when I select "1 String 1" from the dropdown list I want to see "1 String 1" in the combobox value.
Code:
Sub FillData() Dim x(1, 1) As Variant x(0, 0) = 1 x(0, 1) = "String 1" x(1, 0) = 2 x(1, 1) = "String 2" Combobox1.ColumnCount = 2 Combobox1.ColumnWidths = "15, 100" Combobox1.List = x End Sub
Comment