Kod:
Private Sub Textbox4_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
' TEXTBOX İÇİNDE ARAMA YAPAR
If KeyCode <> 14 Then Exit Sub
If Trim(TextBox4.Value) = "" Then: ListeGuncelle: Exit Sub
Set Sh = Sheets("Ana Sayfa")
Ara = TextBox4.Value
Set bulunacak = Sh.Range("D:D").Find(Ara) 'VERİ HANGİ SÜTUNDA ARANACAK
If Not bulunacak Is Nothing Then
Adres = bulunacak.Address
ListView1.ListItems.Clear
Do
sat = bulunacak.Row
With ListView1
.ListItems.Add , , Sh.Cells(sat, 1)
X = X + 1
With .ListItems(X).ListSubItems
' LISTVIEW İÇİNDE SAHA FAZLA İSE İLAVE EDİN
.Add , , Sh.Cells(sat, 2)
.Add , , Sh.Cells(sat, 3)
.Add , , Sh.Cells(sat, 4)
.Add , , Sh.Cells(sat, 5)
.Add , , Sh.Cells(sat, 6)
.Add , , Sh.Cells(sat, 7)
.Add , , Sh.Cells(sat, 8)
.Add , , Sh.Cells(sat, 9)
.Add , , Sh.Cells(sat, 10)
.Add , , Sh.Cells(sat, 11)
.Add , , Sh.Cells(sat, 12)
.Add , , Sh.Cells(sat, 13)
.Add , , Sh.Cells(sat, 14)
'.Add , , Sh.Cells(sat, 15)
.Add , , sat
End With
End With
Set bulunacak = Sh.Range("D:D").FindNext(bulunacak)
Loop While Not bulunacak Is Nothing And bulunacak.Address <> Adres
Else
MsgBox "Aradığınız kritere uygun veri bulunamadı", vbCritical, "ARAMA SONUCUNDA HATA"
TextBox4.Value = ""
ListeGuncelle
End If
End Sub
Textbox4 de bıulunan "Bul" komutuna ikinci bir komut nasıl yapılır.Aslında "Enter" dediğimde buluyordu ama yazı yazamıyorduk,iptal ettim,şimdi de DblClick gibi bir olay gerekir.