linking an icon to a changing adjacent hyperlink

R

Roger on Excel

I would like to link the pressing of an icon to the activation of an adjacent
hyperlink address.

The address changes, so I do not want to manually set the hyperlink in the
usual way.

I want the icon to automatically link to the web address that shows at that
time
 
D

Dave Peterson

Maybe you can use a macro that's assigned to the shape.

I used the cell that is to the left of the topleftcell of that shape.

This is the macro I used:

Option Explicit
Sub testme()
Dim myShape As Shape
Set myShape = ActiveSheet.Shapes(Application.Caller)
ThisWorkbook.FollowHyperlink myShape.TopLeftCell.Offset(0, -1).Value
End Sub
 
Top