Associate Macros to a Hyperlink

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to associate a simple macro to a hyperlink so when click on the hyperlink, excel would go to a certain sheet and change its zoom.

Can anyone help me on how to do it?

Thank you
MJO
 
Hi
you can use the worksheet_followhyperlink event to achieve this. E.g.
put the following code in your worksheet module
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$A$1" Then
'insert your code here
End If
End Sub

The above will process your code if the hyperlink in cell A1 is
invoked.

HTH
Frank
 
Back
Top