Selected Answer
Halk
You didn't attach a file to your question (which often saves us work) so I've created an example file (attached).
It has a green button which launches a UserForm with a ComboBox where the values are set by the RowSource property as:
=Sheet2!A1:A6
where Sheet2 is hidden and the values linked to your column headings on sheet Sample (they can be changed).
The modified version of your code is below (with comments) and I used the _Change sub (not _Click) event. The number of items in the List will depend on how many rows are populated below that item.
Private Sub ComboBox1_Change()
Dim arrData, c As Long
arrData = Worksheets("Sample").Range("A1:F1").Value
' loop through array
For c = LBound(arrData, 2) To UBound(arrData, 2)
'Match value
If arrData(1, c) = ComboBox1.Value Then
' Determine last Row for match
LstRw = Cells(Rows.Count, c).End(xlUp).Row
'Repopulate Listbox
With ListBox1
.Clear
.List = Range(Cells(2, c), Cells(LstRw, c)).Value
End With
End If
Next c
End Sub
REVISION
The second file below (Add TextBox value from ComboBox choice v0_b.xlsm) takes the above and adds a textbox and command button to the UserForm. If a ComboBox selection is made, the list box shows the current items. If an entry is then made in the new textbox and the "Add new value" command button clicked, it runs this variant of the code above (changes in bold):
Private Sub CommandButton1_Click()
Dim arrData, c As Long
arrData = Worksheets("Sample").Range("A1:F1").Value
' loop through array
For c = LBound(arrData, 2) To UBound(arrData, 2)
'Match value
If arrData(1, c) = ComboBox1.Value Then
' Determine last Row for match
LstRw = Cells(Rows.Count, c).End(xlUp).Row
' add to the end
Cells(LstRw + 1, c).Value = TextBox1.Value
'Repopulate Listbox
With ListBox1
.Clear
.List = Range(Cells(2, c), Cells(LstRw + 1, c)).Value
' scroll to new value and highlight
.ListIndex = .ListCount - 1
.Selected(.ListCount - 1) = True
End With
'clear textbox
TextBox1.Value = ""
End If
Next c
End Sub
The result is that value from the text box appears in the worksheet and is highlighted in the ListBox. For example, add "December" with the CB selected as Months.
Hope this works for you.