statt Zelle ganze Zeile markieren
18.12.2003 02:10:12
Annette
Könnte mir jemand das folgende Suchmakro so anpassen, daß nicht nur die einzelne Zelle, sondern die ganze Zeile markiert wird, in der der Suchbegriff gefunden wurde?
Vielen Dank schon mal im Voraus
Annette
Sub MultiSeek()
Dim wks As Worksheet
Dim rng As Range
Dim sAddress As String, sFind As String, BlaNa As String
sFind = InputBox("Bitte Suchbegriff eingeben:")
If sFind = "" Then Exit Sub
BlaNa = ActiveSheet.Name
For Each wks In Worksheets
Set rng = wks.Cells.Find( _
what:=sFind, _
lookat:=xlPart, _
LookIn:=xlValues)
If Not rng Is Nothing Then
sAddress = rng.Address
Do
Application.Goto rng, True
If MsgBox( _
prompt:="Weiter", _
Buttons:=vbYesNo + vbQuestion _
) = vbNo Then Exit Sub
Set rng = Cells.FindNext(after:=ActiveCell)
If rng.Address = sAddress Then Exit Do
Loop
End If
Next wks
MsgBox prompt:="Keine neue Fundstelle!"
Sheets(BlaNa).Select
End Sub