Workbook.SheetFollowHyperlink event (Excel)
Occurs when you choose any hyperlink in Microsoft Excel. For worksheet-level events, see the FollowHyperlink event.
expression.SheetFollowHyperlink (Sh, Target)
expression An expression that returns a Workbook object.
|Sh||Required||Object||The Worksheet object that contains the hyperlink.|
|Target||Required||Hyperlink||The Hyperlink object that represents the destination of the hyperlink.|
This example keeps a list, or history, of all the hyperlinks in the current workbook that have been chosen, plus the names of the worksheets that contain these hyperlinks.
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh as Object, _ ByVal Target As Hyperlink) UserForm1.ListBox1.AddItem Sh.Name & ":" & Target.Address UserForm1.Show End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.