Hallo,
generell was Find/Match angeht kann man schon mal sagen, Du mußt anders deklarieren, in Deinem Fall genau umgekehrt: die Find()-Methode gibt ein Range-Objekt zurück, das muß man immer auf Nothing prüfen und per Set setzen, Application.Match gibt einen Variant zurück, in dem Fall kein Objekt, wird also ohne Set zugew. und auf Fehler-Rückgabe geprüft...
Match:
Dim found As Variant
found = Application.Match(tofind.Value, ActiveSheet.Columns(6), -1)
If IsError(found) Then
MsgBox "nix gefunden...!"
Else
'// weiter geht's...
End If
Find:
Dim found2 As Range
Set found2 = Columns(6).Find(What:=tofind2, LookIn:=xlValues, LookAt:=xlWhole)
If found2 Is Nothing Then
MsgBox "nix gefunden...!"
Else
MsgBox "weiter geht's mit: " & found2.Row
End If
Gruß,
|