Thread: Find error
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
a7n9[_7_] a7n9[_7_] is offline
external usenet poster
 
Posts: 1
Default Find error


Would it not be easy to create a function or a procedure, where you
supply the desired searching range and return TRUE or FALSE if found?
If you do that then you'd have to worry about taking care of error
generation only once.

Something like this may be:

Code:
--------------------
Function WasFound(rng As Range, sFindWhat) As Boolean
On Error GoTo errorhandler
Dim tmp
tmp = rng.Find(what:=sFindWhat, LookIn:=xlValues)
WasFound = True
errorhandler:
WasFound = False
End Function
--------------------


--
a7n9


------------------------------------------------------------------------
a7n9's Profile: http://www.excelforum.com/member.php...o&userid=32149
View this thread: http://www.excelforum.com/showthread...hreadid=562936