Hi all,
I've got the following code which performs a find on a worksheet looking for a value held in the variable strCont:
If the search comes back having not found anything I don't want a message to appear on the screen, I want to be able to use the 'not found' in an If statement. i.e. If not found then do something else.
How do I do this guys?
Cheers
Woody
I've got the following code which performs a find on a worksheet looking for a value held in the variable strCont:
Code:
Cells.Find(What:=(strCont), After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If the search comes back having not found anything I don't want a message to appear on the screen, I want to be able to use the 'not found' in an If statement. i.e. If not found then do something else.
How do I do this guys?
Cheers
Woody