This is all you need
Option Explicit
Dim rSource As Range
Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim Cl As Range
Dim ClAddress As String
With Me
'if no selection in combobox1 quit
If .ComboBox1.ListIndex < 0 Then Exit Sub
.ComboBox2.Clear
Set Cl = rSource.Find(Me.ComboBox1.Value, LookIn:=xlValues)
If Not Cl Is Nothing Then
ClAddress = Cl.Address
Do
.ComboBox2.AddItem Cl.Offset(0, 1).Value
Set Cl = rSource.FindNext(Cl)
Loop While Not Cl Is Nothing And Cl.Address <> ClAddress
End If
End With
End Sub
Private Sub UserForm_Initialize()
'load combobox1
With Sheet1
Set rSource = .Range(.Cells(1, 1), .Cells(.Rows.Count, 1).End(xlUp))
End With
Me.ComboBox1.List = rSource.Value
End Sub
Bookmarks