View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
GCF[_6_] GCF[_6_] is offline
external usenet poster
 
Posts: 1
Default Run-time error ‘91’:


I made this code as simple as possible to get to the bottom of th
problem. Now instead of failing some of the tine, it dies all th
time. Any insight please?

Sub Macro1()
'
For i = 1 To 1000
Columns("A:A").Select
FoundIt = Selection.Find(What:=i, _

After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False).Activate

i = i + 1

Next

End Su

--
GC
-----------------------------------------------------------------------
GCF's Profile: http://www.excelforum.com/member.php...nfo&userid=412
View this thread: http://www.excelforum.com/showthread.php?threadid=26694