ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hyperlinks in two different cells (https://www.excelbanter.com/excel-programming/377159-hyperlinks-two-different-cells.html)

Jeff

Hyperlinks in two different cells
 
Please, Can anyone help.

I need to have several hyperlinks
in different cells B5 and B10 but it didn't work?

I tried using the same call but referencing different cells..

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$B$5" Then 'cell where the hyperlink is
Application.Run "'WorkbookName.ext'!YourSubName", Arg1, Arg2
End If
End Sub

Private Sub Worksheet_FollowHyperlink(ByVal Target2 As Hyperlink)
If Target.Range.Address = "$B$10" Then 'cell where the hyperlink is
Application.Run "'WorkbookName.ext'!YourSubName", Arg1, Arg2
End If
End Sub

thanks
--
Jeff :-)

Jim Cone

Hyperlinks in two different cells
 
answered in your other post - six minutes before you posted this

"Jeff"
wrote in message
Please, Can anyone help.

I need to have several hyperlinks
in different cells B5 and B10 but it didn't work?

I tried using the same call but referencing different cells..

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$B$5" Then 'cell where the hyperlink is
Application.Run "'WorkbookName.ext'!YourSubName", Arg1, Arg2
End If
End Sub

Private Sub Worksheet_FollowHyperlink(ByVal Target2 As Hyperlink)
If Target.Range.Address = "$B$10" Then 'cell where the hyperlink is
Application.Run "'WorkbookName.ext'!YourSubName", Arg1, Arg2
End If
End Sub

thanks
--
Jeff :-)


All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com