View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default How to detect when Find returns nothing?

Hi all

How do I detect when the following code returns nothing, meaning when no
match is found? I need to when no match is found and then take different
action. Please share with me the code syntax to do this? Thanks.

Cells.Find(What:="xyx", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate



Ben


--