View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Range.Find gets slow

What's in this bit

If Not Rng Is Nothing Then

Else


Regards,
Peter T

"vbapro" wrote in message
...
After I use Range.Find method programmatically, the standard search on

sheets
dramatically slows down. What could be the reason and how can this side
effect be taken out? Thanks!
After I use Range.Find method programmatically, star=ndard it searches

The relevant code is


Set Rng = .Find("*" & What & "*", LookIn:=xlValues)

If Not Rng Is Nothing Then
firstAddress = Rng.Address
Do
If Not Rng Is Nothing Then
...
Else
Exit Do
End If

Set Rng = .FindNext(Rng)
Loop While Not Rng Is Nothing And (Rng.Address < firstAddress)
End If