You are on page 1of 1

Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.

ReturnInteger, ByVal Shift As


Integer)
Call Pesquisa_Auto
End Sub
Private Sub Pesquisa_Auto()
Dim Lin As Integer, LinBox As Integer
Dim Busca As Integer, Contador As Integer
Lin = 5
LinBox = 1
Contador = 0

ListBox1.Clear

Do While Lin < 1000


Busca = InStr(Planilha3(Linha, 1), Pesquisa)
If Busca > 0 Then
With ListBox1
.AddItem
.List(LinBox, 0) = Planilha3(Lin, 1)
.List(LinBox, 1) = Planilha3(Lin, 2)
.List(LinBox, 2) = Planilha3(Lin, 3)
.List(LinBox, 3) = Planilha3(Lin, 4)
End With
LinBox = LinBox + 1
Contador = Contador + 1
End If
Lin = Lin + 1
Loop

End Sub

You might also like