acebeci
Altın Üye
- Katılım
- 25 Ağustos 2007
- Mesajlar
- 326
- Excel Vers. ve Dili
- ofis excel 2010 türkçe
- Altın Üyelik Bitiş Tarihi
- 03-11-2026
Değerli arkadaşlar elimdeki aşağıdaki kod ile TexBox İle ListBox da süzme yaptırıyorum.Yalnız şöyle bir sıkıtı var küçük harfle arama yaptığımda sonuca ulaşamıyorum birde diyelim ki yazım yanlışı yaparsam bütün yazdığımı silip tekrar yazmam gerekiyor o işlem içinde geriye doğru sildikçe sonuca doğru ulaşabilir miyim? İnşallah anlatabilmişimdir.Şimdiden ilginizden dolayı çok teşekkür ederim.
Private Sub ListBox1_Click()
If ListBox1.ListCount = 0 Then Exit Sub
Sheets(ListBox1.Value).Select
Unload Me
End Sub
Private Sub TextBox1_Change()
Dim arrVeri()
Dim y As Long, i As Long, son As Long
y = 0
Set sh = Sheets("liste")
On Error Resume Next
If TextBox1 <> Empty Then
For i = 0 To ListBox1.ListCount - 1
If InStr(1, ListBox1.List(i), UCase(TextBox1)) > 0 Then
ReDim Preserve arrVeri
arrVeri
= ListBox1.List(i)
y = y + 1
End If
Next i
ListBox1.Clear
ListBox1.List = arrVeri
Else
ListBox1.Clear
son = sh.Cells(65536, 2).End(xlUp).Row
For i = 3 To son
ListBox1.AddItem sh.Cells(i, 2)
Next i
End If
Set sh = Nothing
End Sub
Private Sub UserForm_Initialize()
Dim arrVeri()
Dim y As Long, i As Long, son As Long
y = 0
Set sh = Sheets("liste")
On Error Resume Next
If TextBox1 <> Empty Then
For i = 0 To ListBox1.ListCount - 1
If InStr(1, ListBox1.List(i), UCase(TextBox1)) > 0 Then
ReDim Preserve arrVeri
arrVeri
= ListBox1.List(i)
y = y + 1
End If
Next i
ListBox1.Clear
ListBox1.List = arrVeri
Else
ListBox1.Clear
son = sh.Cells(65536, 2).End(xlUp).Row
For i = 3 To son
ListBox1.AddItem sh.Cells(i, 2)
Next i
End If
Set sh = Nothing
End Sub
Private Sub ListBox1_Click()
If ListBox1.ListCount = 0 Then Exit Sub
Sheets(ListBox1.Value).Select
Unload Me
End Sub
Private Sub TextBox1_Change()
Dim arrVeri()
Dim y As Long, i As Long, son As Long
y = 0
Set sh = Sheets("liste")
On Error Resume Next
If TextBox1 <> Empty Then
For i = 0 To ListBox1.ListCount - 1
If InStr(1, ListBox1.List(i), UCase(TextBox1)) > 0 Then
ReDim Preserve arrVeri
arrVeri
y = y + 1
End If
Next i
ListBox1.Clear
ListBox1.List = arrVeri
Else
ListBox1.Clear
son = sh.Cells(65536, 2).End(xlUp).Row
For i = 3 To son
ListBox1.AddItem sh.Cells(i, 2)
Next i
End If
Set sh = Nothing
End Sub
Private Sub UserForm_Initialize()
Dim arrVeri()
Dim y As Long, i As Long, son As Long
y = 0
Set sh = Sheets("liste")
On Error Resume Next
If TextBox1 <> Empty Then
For i = 0 To ListBox1.ListCount - 1
If InStr(1, ListBox1.List(i), UCase(TextBox1)) > 0 Then
ReDim Preserve arrVeri
arrVeri
y = y + 1
End If
Next i
ListBox1.Clear
ListBox1.List = arrVeri
Else
ListBox1.Clear
son = sh.Cells(65536, 2).End(xlUp).Row
For i = 3 To son
ListBox1.AddItem sh.Cells(i, 2)
Next i
End If
Set sh = Nothing
End Sub