[CODE=vba]
Private Sub Tbx_BuscarProducto_Change()
Dim items As Variant
Dim i As Long
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect
Next ws
ListBox1.Clear
'Here I load the listbox1 with the values of the range, it has a total of 6 columns...
'The range is a table found on sheet 3..
items = Range("Guia").CurrentRegion.Rows.Count
For i = 2 To items
If LCase(Cells(i, 1).Value) Like "*" & LCase(Me.Tbx_BuscarProducto.Value) & "*" Then
Me.ListBox1.AddItem Cells(i, 1)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = Cells(i, 2)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = Cells(i, 3)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = Cells(i, 4) & "$"
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = Cells(i, 5) & "$"
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 5) = Cells(i, 6) & "Bs"
ElseIf LCase(Cells(i, 2).Value) Like "*" & LCase(Me.Tbx_BuscarProducto.Value) & "*" Then
Me.ListBox1.AddItem Cells(i, 1)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = Cells(i, 2)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = Cells(i, 3)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = Cells(i, 4) & "$"
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = Cells(i, 5) & "$"
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 5) = Cells(i, 6) & "Bs"
End If
Next i
For Each ws In ActiveWorkbook.Worksheets
ws.Protect
Next ws
End Sub