Hyperlinks in two different cells

J

Jeff

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
 
J

Jim Cone

answered in your other post - six minutes before you posted this

"Jeff" <[email protected]>
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top