sinnernekolens
Altın Üye
- Katılım
- 23 Temmuz 2009
- Mesajlar
- 310
- Excel Vers. ve Dili
- Ofis 2019 - Türkçe 64bit
- Altın Üyelik Bitiş Tarihi
- 02-09-2027
iyi akşamlar, aşağıdaki kod ile arama yapıyorum. ancak söyle bir isteğim olacak buton ile arama kutusunu açtığımda aranacak listeyi listboxda görmek istiyorum. textbox lada istediğimi yazıp bulacam. bu kod sadece aradığını buyor listeyi göstermiyor.
Kod:
Private Sub TextBox1_Change()
Dim i As Long
On Error Resume Next
Me.TextBox1.Text = StrConv(Me.TextBox1.Text, vbProperCase)
Me.ListBox1.Clear
For i = 2 To Application.WorksheetFunction.CountA(Sheet1.Range("A:A"))
For x = 1 To 4
a = Len(Me.TextBox1.Text)
If Left(Sheet1.Cells(i, x).Value, a) = Me.TextBox1.Text And Me.TextBox1.Text <> "" Then
Me.ListBox1.AddItem Sheet1.Cells(i, 1).Value
For c = 1 To 4
Me.ListBox1.List(ListBox1.ListCount - 1, c) = Sheet1.Cells(i, c + 1).Value
Next c
End If
Next x
Next i
End Sub
Ekli dosyalar
-
24.9 KB Görüntüleme: 8
