Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell Hyperlink is Called From 1

Status
Not open for further replies.

sabloomer

Technical User
Aug 8, 2003
153
US
I have a sheet (Office 2007) that has a lot of hyperlinks. I am adding code to the Worksheet_FollowHyperlink sub. I need to be able to capture where that hyperlink was called from. This event seems to be an "after" not "before" event. When I ask for the active cell, it gives me the cell on the destination sheet. Is there something to give me the last active cell?

I have tried ...
target.address
target.SubAddress
target.name
target.creator
target.range

and can not find a way to identify where the hyperlink was called from. I am looking form somethink like targer.anchor, but that does not seem to exist.

Thank you for your help,

sabloomer
 
Have you tried the Application.Caller property ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Where I run the code from the help..

Select Case TypeName(Application.Caller)
Case "Range"
v = Application.Caller.Address
Case "String"
v = Application.Caller
Case "Error"
v = "Error"
Case Else
v = "unknown"

End Select

MsgBox "caller = " & v


I get "Error". I thought that was going to be it! I will keep looking. I thougt I had something with "ExtraInfo", but I can't seem to create a hyperlink with that property.

Thank You,

sabloomer
 
That was an hour I will never get back! The problem was that I neede Target.Range.Address not Target.Address.

Thanks PHV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top