R
ranswert
I have the following code:
With rng
Set xcell = .find(what:=drwno, LookIn:=xlValues,
LookAt:=xlWhole, _
SearchOrder:=xlByColumns)
a = xcell.Offset(0, 10).Value
xcell.Offset(0, 10).Select
If a <> linkno Then
cnt = 0
Do
cnt = cnt + 1
Set xcell = .FindNext(xcell)
a = xcell.Offset(0, 10).Value
Loop While a <> linkno And cnt < drwitemnum + 1
xcell.Select
End If
End With
How do I get the procedure to skip 'find' if there is no 'drwno' in the range?
Thanks
With rng
Set xcell = .find(what:=drwno, LookIn:=xlValues,
LookAt:=xlWhole, _
SearchOrder:=xlByColumns)
a = xcell.Offset(0, 10).Value
xcell.Offset(0, 10).Select
If a <> linkno Then
cnt = 0
Do
cnt = cnt + 1
Set xcell = .FindNext(xcell)
a = xcell.Offset(0, 10).Value
Loop While a <> linkno And cnt < drwitemnum + 1
xcell.Select
End If
End With
How do I get the procedure to skip 'find' if there is no 'drwno' in the range?
Thanks