Erste Spalte anzeigen lassen
19.01.2004 09:55:19
mockwei
Ich habe da mal ein kleines Problem mit der Suche.
Wenn ich mit folgendem Marko einen Begrief suche und dieser sich in der B Spalte befindet so wird diese auch gleich markiert. Das ist auch gut so. aber ist es Möglich das die Erste Spalte Sichtbar bleibt?. Er stellt dann nähmlich immer die B Spalte als erstes hin. Und dann ist A nicht mehr Sichtbar. Für Euch sicher kein act.
Sub MultiSeek()
Dim wks As Worksheet
Dim rng As Range
Dim sAddress As String, sFind As String
sFind = InputBox("Bitte Suchbegriff eingeben:")
For Each wks In Worksheets
Set rng = wks.Cells.Find( _
what:=sFind, _
lookat:=xlPart, _
LookIn:=xlFormulas)
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!"
End Sub
MfG
Mockwei