Sub Duplikate_finden()
Dim WS As Worksheet
Dim raZelle As Range
Dim strAdresse As String
Dim such As String
Dim loTabelle As Long
such = _
InputBox(prompt:= _
"please enter the code you are looking for: ", _
Title:="", Default:="")
If such = "" Then
MsgBox ("searchcanceled!")
Exit Sub
End If
For loTabelle = 1 To Worksheets.Count
With Worksheets(loTabelle).UsedRange
Set raZelle = .Find(such, lookat:=xlPart, LookIn:=xlValues)
If Not raZelle Is Nothing Then
strAdresse = raZelle.Address
Do
raZelle.Interior.ColorIndex = 6
Select Case MsgBox("Der Eintrag """ & raZelle & """ befindet sich in Tabelle " & Worksheets(loTabelle).Name & " Zelle " & raZelle.Address _
& Chr(13) & "Ist ihre Suche damit beendet?", vbYesNoCancel, "Sicherheitsabfrage...")
Case 2 ´Schaltfläche Abbruch
MsgBox ("Suche abgebrochen!")
Exit Sub
Case 6 ´Schaltfläche Ja
Exit Sub
Case 7 ´Schaltfläche Nein
End Select
Set raZelle = .FindNext(raZelle)
Loop While Not raZelle Is Nothing And raZelle.Address <> strAdresse
End If
End With
Next loTabelle
If raZelle Is Nothing Then MsgBox "Es wurden keine Einträge gefunden!", , "Info..."
End Sub
VBA: Worksheetfunction.substitute
Oli00 17.04.2007 - 129 Hits - 8 Antworten
von benutzer defenierte methode
js_rulez 23.07.2007 - 39 Hits - 4 Antworten
VBA Find-Methode
ignaz 27.11.2007 - 203 Hits - 3 Antworten
Erweiterte Suche sofort anzeigen
ERS 19.12.2007 - 69 Hits -
Lautstärkeregelungs-Mixer problem
Hauckei85 10.06.2008 - 184 Hits -