I have a Cells.Find(What:="Text1", etc) in the middle of a macro to set a variable to the ActiveCell. If this does not find Text1, how to i complete the following to display message box and exit the sub, otherwise continue with the sub.....
Dim Old as Long
Dim rngFind As Range
rngFind = Cells.Find(What:="Text1", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
If rngFind = Nothing Then
-display message box: Text1 Not Found, Ending Macro Now
-Exit Sub
End IF
Old = ActiveCell.Row
rest of sub... blah blah
End Sub
I'm close but still learning...
----------
As it turns out... The message box and the Exit Sub are easy... But I'm really lost on how to write the IF THEN if Text1 not found
Bookmarks