I solved the issue by creating the following Sub.
Sub Filter()
Dim line, linelistbox As Integer
Dim value_cell As String
Dim Quantidade As Double
'Quantidade = txtAmount
linelistbox = 0
line = 2
ListBox1.Clear
Application.ScreenUpdating = False
Plan1.Select
Do Until Plan1.Cells(line, 1) = ""
With Plan1
While .Cells(line, 1).Value <> ""
value_cell = .Cells(line, 2).Value
If UCase(Left(value_cell, Len(Combo_ProductType.Text))) = UCase(Combo_ProductType.Text) Then
If txtAmount <> "" Then
Quantidade = txtAmount
Else
Quantidade = 1
End If
With ListBox1
.AddItem
.List(linelistbox, 0) = Plan1.Cells(line, 1)
.List(linelistbox, 1) = Plan1.Cells(line, 2)
.List(linelistbox, 2) = Plan1.Cells(line, 3)
.List(linelistbox, 3) = Plan1.Cells(line, 4) * Quantidade
.List(linelistbox, 4) = Format(Plan1.Cells(line, 5) * Quantidade, "Currency")
.List(linelistbox, 5) = Format(Plan1.Cells(line, 6) * Quantidade, "Currency")
End With
linelistbox = linelistbox + 1
End If
line = line + 1
Wend
End With
Loop
End Sub
Bookmarks