i am using this to in a macro to find stuff in my sheet:
Selection.Find(What:=email, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
how can i tell whether or not it found something?
Dim rng As Range
Set rng = Selection.Find(What:=email, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
If Not rng Is Nothing Then 'when rng <> nothing means found something'
rng.Activate
End IF
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With