[ÇÖZÜLDÜ] ara_bul

G

Guest

Misafir
Ekili dosyadaki açıklama doğrultusunda ara makrosunun düzeltilmesi nasıl yapılabilir.
 

Haluk

Özel Üye
Katılım
7 Temmuz 2004
Mesajlar
12,406
Excel Vers. ve Dili
64 Bit 2010 - İngilizce
+
Google Sheets
+
JScript
Altın Üyelik Bitiş Tarihi
Aşağıdakini bir ara denersiniz;

[vb:1:d8555325f2]Private Sub CommandButton1_Click()
Dim FirstMatch As String, strVal As String, MyMsg As String
Dim MyData As Variant
If Len(TextBox1) >= 1 Then
Set MyData = Columns("C").Find(TextBox1)
If Not MyData Is Nothing Then
FirstMatch = MyData.Address
Do
strVal = strVal & MyData.Address(False, False) & vbCrLf
Set MyData = Columns("C").FindNext(MyData)
Loop While Not MyData Is Nothing And MyData.Address <> FirstMatch
End If
Else
MsgBox "Aranılacak değeri girin..."
Exit Sub
End If
If strVal = Empty Then strVal = "Bulunamadı...."
MyMsg = "Aranılan değer " & TextBox1 & " nın bulunduğu hücreler:" _
& vbCrLf & String(35, "*")
MsgBox MyMsg & vbCrLf & strVal
Set MyData = Nothing
End Sub
[/vb:1:d8555325f2]
 
Üst