excel - On hyperlink click find what cell or cell value is

M

Mavrick

I have an excel sheet that is locked, I have in all cells a1 thru
a999999(dynamic) a hyperlink that points to a dummy cell. I catch the
hyper link click in the hyperlink event and want to call a function
using the value in the cell they have clicked on, but cant find a way
of telling what hyper link has been clicked.

I need to find how to determin what the hyperlink cell was or text that
the hyper link was, tried the active cell but it points to the dummy
one.


short of changing the value in every hyper link to A1, a2 a3 a4 and so
on. The values in the sheet shown are picked up from another sheet so
the hyper link values are dynamic. Tried seting the first cell the
hyper link a1 and cut and paste but left it as a1 !
 
T

Tom Ogilvy

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
msgbox hyperlink.Range.Address & ", " & hyperlink.TextToDisplay
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top