Suchmakro / Code-Probleme
23.09.2008 10:54:00
sockel939
ich möchte dieser Suchfunktion sagen das sie nach 2 Übereinstimmungen suchen soll.
Was mach ich falsch ?
Thanks in advance
Private Sub CommandButton1_Click()
Dim Sh As Worksheet
Dim GZelle As Range
Dim FStelle$
Dim SBegriff
Dim SBegriff1
If SBegriff = InputBox("Bitte Suchbegriff eingeben:") And SBegriff1 = InputBox("Bitte _
Suchbegriff eingeben:") Then
For Each Sh In Worksheets
Sh.Activate
Set GZelle = Sh.Cells.Find(SBegriff) And (SBegriff1)
If Not GZelle Is Nothing Then
FStelle = GZelle.Address
Do
GZelle.Activate
If MsgBox("Weiter", vbYesNo + vbQuestion) = vbNo Then Exit Sub
Set GZelle = Sh.Cells.FindNext(after:=ActiveCell)
If GZelle.Address = FStelle Then Exit Do
Loop
End If
Next Sh
End If
End Sub