Thread: Loop
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ranswert ranswert is offline
external usenet poster
 
Posts: 161
Default Loop

Will this get in a continual loop if "a" never equals "linkno"?

With rng
Set xcell = .find(what:=drwno, LookIn:=xlValues,
LookAt:=xlWhole, _
SearchOrder:=xlByColumns)
a = xcell.Offset(0, 10).Value
MsgBox ("a = " & a)
If a < linkno Then
Do
Set xcell = .FindNext(xcell)
a = xcell.Offset(0, 10).Value
Loop While a < linkno
End If
End With
Thanks