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 -- |
How to detect when Find returns nothing?
See Schollar's response in:
http://groups.google.com/group/micro...06311c55e74647 -- Gary's Student "Ben" wrote: 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 -- |
All times are GMT +1. The time now is 06:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com