arkadaslar arama butonum tam randımanlı çalışmıyor örneğin b3 hücresinde "büyük anıt" yazıyor arama kutucuguna "büyük" yazarsam buluyor ama anıt yazarsam bulmuyor
ben yazdığım her kelimeyi bulmasını ıstıyorum elımdekı kodu asagıda paylastım yardımlarınızı beklıyorum
Private Sub CommandButton1_Click()
Dim K As Range, adr As String, sat As Long, J As Long
ListBox1.Clear
If TextBox1.Text = "" Then
MsgBox "Lütfen Ara kutusuna bir değer giriniz!!", vbCritical, "U Y A R I"
TextBox1.SetFocus
Exit Sub
End If
sat = Cells(Rows.Count, "B").End(xlUp).Row
Set K = Range("B1:B" & sat).Find(TextBox1.Text & "*", , xlValues, xlWhole)
If Not K Is Nothing Then
adr = K.Address
Do
ListBox1.AddItem
ListBox1.Column(0, J) = ActiveSheet.Name
ListBox1.Column(1, J) = K.Value
ListBox1.Column(2, J) = K.Address
J = J + 1
Set K = Range("B1:B" & sat).FindNext(K)
Loop While Not K Is Nothing And adr <> K.Address
End If
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label2_Click()
End Sub
Private Sub ListBox1_Click()
If ListBox1.ListCount < 1 Then Exit Sub
Range(ListBox1.Column(2)).Select
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
ListBox1.ColumnCount = 3
ListBox1.ColumnWidths = "70;150;70"
End Sub
Private Sub CommandButton1_Click()
Dim K As Range, adr As String, sat As Long, J As Long
ListBox1.Clear
If TextBox1.Text = "" Then
MsgBox "Lütfen Ara kutusuna bir değer giriniz!!", vbCritical, "U Y A R I"
TextBox1.SetFocus
Exit Sub
End If
sat = Cells(Rows.Count, "B").End(xlUp).Row
Set K = Range("B1:B" & sat).Find(TextBox1.Text & "*", , xlValues, xlWhole)
If Not K Is Nothing Then
adr = K.Address
Do
ListBox1.AddItem
ListBox1.Column(0, J) = ActiveSheet.Name
ListBox1.Column(1, J) = K.Value
ListBox1.Column(2, J) = K.Address
J = J + 1
Set K = Range("B1:B" & sat).FindNext(K)
Loop While Not K Is Nothing And adr <> K.Address
End If
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label2_Click()
End Sub
Private Sub ListBox1_Click()
If ListBox1.ListCount < 1 Then Exit Sub
Range(ListBox1.Column(2)).Select
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
ListBox1.ColumnCount = 3
ListBox1.ColumnWidths = "70;150;70"
End Sub
