Use a boolean 'flag' to let your code know whether an ID was found or
not...
Dim bFoundID As Boolean
...and add it to the part of code that finds an ID...
...<snip
If Not Rng Is Nothing Then
bFoundID = True: MsgBox Rng.Address & " " & ws.Name
End If
...and just check its value...
...<snip
Next ws
If Not bFoundID Then MsgBox "Not found"
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion