Apply error trap to all objects in worksheet?
You can trap the hyperlink events and do the checking there. Either use the
"FollowHyperlink" event of a worksheet, or use the "SheetFollowHyperlink"
event of the workbook (which traps ALL hyperlink events on ALL worksheets).
Whenever the user clicks on a hyperlink, either one or the other of these
events will be triggered, and you can place code in them to check the
hyperlink for an error.
HTH,
Eric
"plh" wrote:
Hi Gurus,
Say there are a number of pictures on a worksheet. Each has a hyperlink.
Clicking the picture opens the hyperlink. These hyperlinks are such that the
action results in an error to the effect that no program is associated with the
file. It would be trivial to trap this error for an individual picture, then add
the code to do whatever. However, what I want to do is create the situation
where the error trap would apply to ALL hyperlinked pictures on the worksheet,
even newly created ones. The result would be that if a user added a new picture,
and set up a hyperlink to it, that new picture would react the same way. Is
there some way to do this and if so, would any of you enlighten me as to the
method?
Thank You!
-plh
--
Where are we going and why am I in this HAND BASKET??
|