moreira_logistica,
Se você notar, no código do ComboBox, há um laço Select Case, como segue :
Código: Selecionar todos
Select Case ComboBox1
Case Is = "TODOS"
ThisWorkbook.Sheets("Notas").Activate
ListBox4.Clear
For a = 2 To ActiveSheet.UsedRange.Rows.Count
Cells(a, "L").Select
If Cells(a, "L") = "" Then Exit For
ListBox4.AddItem Cells(a, "A")
ListBox4.List(ListBox4.ListCount - 1, 1) = Cells(a, "B")
ListBox4.List(ListBox4.ListCount - 1, 2) = Cells(a, "C")
ListBox4.List(ListBox4.ListCount - 1, 3) = Cells(a, "D")
ListBox4.List(ListBox4.ListCount - 1, 4) = Cells(a, "E")
ListBox4.List(ListBox4.ListCount - 1, 5) = Cells(a, "F")
ListBox4.List(ListBox4.ListCount - 1, 6) = Cells(a, "G")
ListBox4.List(ListBox4.ListCount - 1, 7) = Cells(a, "H")
ListBox4.List(ListBox4.ListCount - 1, 8) = Cells(a, "I")
Next
Case Is <> "TODOS"
ThisWorkbook.Sheets("Notas").Activate
ListBox4.Clear
For b = 2 To ActiveSheet.UsedRange.Rows.Count
Cells(b, "L").Select
If Cells(b, "L") = "" Then Exit For
If Trim(Cells(b, "L").Value) = ComboBox1 Then
ListBox4.AddItem Cells(b, "A")
ListBox4.List(ListBox4.ListCount - 1, 1) = Cells(b, "B")
ListBox4.List(ListBox4.ListCount - 1, 2) = Cells(b, "C")
ListBox4.List(ListBox4.ListCount - 1, 3) = Cells(b, "D")
ListBox4.List(ListBox4.ListCount - 1, 4) = Cells(b, "E")
ListBox4.List(ListBox4.ListCount - 1, 5) = Cells(b, "F")
ListBox4.List(ListBox4.ListCount - 1, 6) = Cells(b, "G")
ListBox4.List(ListBox4.ListCount - 1, 7) = Cells(b, "H")
ListBox4.List(ListBox4.ListCount - 1, 8) = Cells(b, "I")
End If
Next
End Select
Faça o seguinte :
Recorte o laço Select Case todo de dentro do ComboBox, adicione esta linha no lugar :
Crie uma rotina (pode ser no próprio Userform), e cole dentro do código desta nova rotina o laço Select Case, ex :
Código: Selecionar todos
Sub pesquisar_Status()
Select Case ComboBox1
Case Is = "TODOS"
ThisWorkbook.Sheets("Notas").Activate
ListBox4.Clear
For a = 2 To ActiveSheet.UsedRange.Rows.Count
Cells(a, "L").Select
If Cells(a, "L") = "" Then Exit For
ListBox4.AddItem Cells(a, "A")
ListBox4.List(ListBox4.ListCount - 1, 1) = Cells(a, "B")
ListBox4.List(ListBox4.ListCount - 1, 2) = Cells(a, "C")
ListBox4.List(ListBox4.ListCount - 1, 3) = Cells(a, "D")
ListBox4.List(ListBox4.ListCount - 1, 4) = Cells(a, "E")
ListBox4.List(ListBox4.ListCount - 1, 5) = Cells(a, "F")
ListBox4.List(ListBox4.ListCount - 1, 6) = Cells(a, "G")
ListBox4.List(ListBox4.ListCount - 1, 7) = Cells(a, "H")
ListBox4.List(ListBox4.ListCount - 1, 8) = Cells(a, "I")
Next
Case Is <> "TODOS"
ThisWorkbook.Sheets("Notas").Activate
ListBox4.Clear
For b = 2 To ActiveSheet.UsedRange.Rows.Count
Cells(b, "L").Select
If Cells(b, "L") = "" Then Exit For
If Trim(Cells(b, "L").Value) = ComboBox1 Then
ListBox4.AddItem Cells(b, "A")
ListBox4.List(ListBox4.ListCount - 1, 1) = Cells(b, "B")
ListBox4.List(ListBox4.ListCount - 1, 2) = Cells(b, "C")
ListBox4.List(ListBox4.ListCount - 1, 3) = Cells(b, "D")
ListBox4.List(ListBox4.ListCount - 1, 4) = Cells(b, "E")
ListBox4.List(ListBox4.ListCount - 1, 5) = Cells(b, "F")
ListBox4.List(ListBox4.ListCount - 1, 6) = Cells(b, "G")
ListBox4.List(ListBox4.ListCount - 1, 7) = Cells(b, "H")
ListBox4.List(ListBox4.ListCount - 1, 8) = Cells(b, "I")
End If
Next
End Select
End Sub
Então, no botão que efetua a atualização, basta chamar a nova rotina ao final de todo o código :
Fui objetivo na resposta?

Abs