View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel VBA Problem- Using Find Function

Find doesn't produce an error when the item searched for is not found. Code
that assumes the item will always be found produces the error

cells.Find("ZX2HZ")

doesn't produce an error

cells.Find("ZX2HZ").Activate

produces an error because it assumes the string is found.

--
Regards,
Tom Ogilvy

"Chris_Fifield " wrote in
message ...
"Find" produces that error when what you are searching for is not found
on the spreadsheet. Are those values that are giving you the error on
your sheet? As Doug pointed out you may have to format your query, but
also make sure what's on your spreadsheet is formatted properly so that
it will match with your query.


---
Message posted from http://www.ExcelForum.com/