Private Sub Textbox4_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Trim(TextBox4) = "" Then: ListeGuncelle: Exit Sub
Set Sh = Sheets("Ana Sayfa")
Ara = TextBox4
Set bulunacak = Sh.Range("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 , , sat
End With
End With
Set bulunacak = Sh.Range("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 = ""
ListeGuncelle
End If
End Sub
Selamlar,Yukarıdaki kod "Enter" dan sonra verileri Listview içine listeliyor,ama isteğim aynı anda TextBoxların içine de arama kriteri ile ilgili verileri de yüklemesi.Bir ipucu rica ediyorum.
If Trim(TextBox4) = "" Then: ListeGuncelle: Exit Sub
Set Sh = Sheets("Ana Sayfa")
Ara = TextBox4
Set bulunacak = Sh.Range("D
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 , , sat
End With
End With
Set bulunacak = Sh.Range("D
Loop While Not bulunacak Is Nothing And bulunacak.Address <> Adres
Else
MsgBox "Aradığınız kritere uygun veri bulunamadı", vbCritical, "ARAMA SONUCUNDA HATA"
TextBox4 = ""
ListeGuncelle
End If
End Sub
Selamlar,Yukarıdaki kod "Enter" dan sonra verileri Listview içine listeliyor,ama isteğim aynı anda TextBoxların içine de arama kriteri ile ilgili verileri de yüklemesi.Bir ipucu rica ediyorum.
