That's expected behavior of Combobox. Combobox can only display value of first visible column.
I've experimented with it before. But there really isn't direct way to show both columns.
One method is to use caption or text box above combo box to show both.
Another is to have 3rd column added to range concatenating 1 & 2.
Then setting column width of 1st and 2nd to 0. Hence, showing 3rd column only.
Private Sub UserForm_Initialize()
Dim cLoc As Range
Dim ws As Worksheet
Dim listArr
Set ws = ThisWorkbook.Sheets("Sheet1")
listArr = ws.Range("Hours").Resize(, 3)
With Me.ComboBox1
.ColumnCount = 3
.ColumnWidths = "0;0;50"
.List = listArr
End With
End Sub
Or use _Change event to change ColumnWidth.
Private Sub ComboBox1_Change()
With Me.ComboBox1
.ColumnWidths = "0;0;50"
End With
End Sub
Private Sub UserForm_Initialize()
Dim cLoc As Range
Dim ws As Worksheet
Dim listArr
Set ws = ThisWorkbook.Sheets("Sheet1")
listArr = ws.Range("Hours").Resize(, 3)
With Me.ComboBox1
.ColumnCount = 3
.ColumnWidths = "50;50;0"
.List = listArr
End With
End Sub
Or just use listbox instead of Combobox.
Bookmarks