Te anexo la parte para llenar el listbox, cada que cambias un dato en los combos
Dim h
'
Private Sub ComboBox1_Change()
'Por Dante Amor
Call LlenarList
End Sub
Private Sub ComboBox2_Change()
Call LlenarList
End Sub
Private Sub ComboBox3_Change()
Call LlenarList
End Sub
Private Sub ComboBox4_Change()
Call LlenarList
End Sub
'
Sub LlenarList()
'Por Dante Amor
ListBox1.Clear
For i = 3 To h.Range("F" & Rows.Count).End(xlUp).Row
If ComboBox1.Value = "" Then
fec1 = h.Cells(i, "F").Value
fec2 = fec1
Else
fec1 = CDate(ComboBox1.Value)
If ComboBox2.Value = "" Then
fec2 = fec1
Else
fec2 = CDate(ComboBox2.Value)
End If
End If
If ComboBox3.Value = "" Then
combo3 = h.Cells(i, "L").Value
Else
combo3 = ComboBox3.Value
End If
If ComboBox4.Value = "" Then
combo4 = h.Cells(i, "G").Value
Else
combo4 = ComboBox4.Value
End If
'
If h.Cells(i, "F").Value >= fec1 And h.Cells(i, "F").Value <= fec2 And _
h.Cells(i, "L").Value = combo3 And h.Cells(i, "G").Value = combo4 Then
ListBox1.AddItem h.Cells(i, "F").Value
ListBox1.List(ListBox1.ListCount - 1, 1) = h.Cells(i, "O").Value
ListBox1.List(ListBox1.ListCount - 1, 2) = h.Cells(i, "C").Value
ListBox1.List(ListBox1.ListCount - 1, 3) = h.Cells(i, "L").Value
ListBox1.List(ListBox1.ListCount - 1, 4) = h.Cells(i, "D").Value
ListBox1.List(ListBox1.ListCount - 1, 5) = i
End If
Next
End Sub
'
Private Sub UserForm_Activate()
'Por Dante Amor
Set h = Sheets("BaseDeDatos")
For i = 3 To h.Range("F" & Rows.Count).End(xlUp).Row
If IsDate(h.Cells(i, "F")) Then
Call Agregar_Fec(ComboBox1, h.Cells(i, "F"))
Call Agregar_Fec(ComboBox2, h.Cells(i, "F"))
End If
Call Agregar(ComboBox3, h.Cells(i, "L"))
Call Agregar(ComboBox4, h.Cells(i, "G"))
Next
End Sub
'
Sub Agregar_Fec(combo As ComboBox, dato As String)
'Por Dante Amor
'Cargar fechas en los combos
Dim fec1 As Date
Dim fec2 As Date
fec2 = CDate(dato)
For i = 0 To combo.ListCount - 1
fec1 = CDate(combo.List(i))
If fec1 = fec2 Then Exit Sub
If fec1 > fec2 Then combo.AddItem fec2, i: Exit Sub
Next
combo.AddItem fec2 'Es mayor lo agrega al final
End Sub
'
Sub Agregar(combo As ComboBox, dato As String)
'Por Dante Amor
'Cargar datos en los combos
For i = 0 To combo.ListCount - 1
Select Case StrComp(combo.List(i), dato, vbTextCompare)
Case 0: Exit Sub 'ya existe en el combo y ya no lo agrega
Case 1: combo.AddItem dato, i: Exit Sub 'Es menor, lo agrega antes del comparado
End Select
Next
combo.AddItem dato 'Es mayor lo agrega al final
End Sub
sal u dos