Try this.
Private Sub UserForm_Initialize()
Dim dicCustomers As Object
Set dicCustomers = CreateObject("Scripting.Dictionary")
With Worksheets("Schedule")
x = Cells(Rows.Count, 1).End(xlUp).Row
For Row = 2 To x
If Not dicCustomers.exists(.Cells(Row, 1).Value) Then
dicCustomers.Add .Cells(Row, 1).Value, Row
End If
Next Row
End With
ComboBox1.List = dicCustomers.keys
With TextBox3
.Text = "mm/dd/yy"
End With
End Sub
Private Sub ComboBox1_Change()
Dim rng As Range
Dim cl As Range
If ComboBox1.ListIndex <> -1 Then
ComboBox2.Clear
With Worksheets("Schedule")
Set rng = .Range("A2", .Cells(.Rows.Count, 1).End(xlUp))
End With
For Each cl In rng
If cl.Value = ComboBox1.Value Then
ComboBox2.AddItem cl.Offset(, 1).Value
End If
Next cl
End If
End Sub
Bookmarks