AW: Suchfunktion trotz Blattschutz
08.04.2021 15:06:44
Nepumuk
Hallo Ulli,
kann ich nicht nachvollziehen. Wenn ich in deiner Testmappe nach "u" suchen werden mir 3 Treffer angezeigt.
Ab Zeile 20 einfach so:
'Suche in allen Blättern
If chk_alles.Value = True Then
For Each WS In Worksheets
With WS
Set raBereich = .Range(.Cells(20, 1), .Cells(.Rows.Count, .Columns.Count))
Set Found = raBereich.Find(What:=s, LookAt:=xlPart, LookIn:=xlValues)
If Not Found Is Nothing Then
boFund = True
firstAddress = Found.Address
Do
ListBox1.AddItem Found
ListBox1.List(I, 1) = .Cells(Found.Row, 1)
ListBox1.List(I, 2) = .Cells(Found.Row, 2)
ListBox1.List(I, 3) = .Cells(Found.Row, 3)
ListBox1.List(I, 4) = .Cells(Found.Row, 4)
ListBox1.List(I, 5) = .Cells(Found.Row, 5)
ListBox1.List(I, 6) = .Cells(Found.Row, 6)
ListBox1.List(I, 7) = .Cells(Found.Row, 7)
ListBox1.List(I, 8) = .Name
ListBox1.List(I, 9) = Found.Row
I = I + 1
Set Found = raBereich.FindNext(Found)
Loop Until Found.Address = firstAddress
End If
End With
Next WS
End If
Gruß
Nepumuk