View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Cells.find restricted to a single range??

Steff,

Try writing your code like

Dim FoundCell As Range
Set FoundCell = RngTest.Find(...)
If FoundCell Is Nothing Then
' no value found in RngTest
Else
FoundCell.Activate
End If

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Steff_DK " wrote in
message ...
What if there's no such entry in the range?

I get runtime error if I search for a number that isn't in the

range...


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