ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   3 different hyperlinks attached to the same cell? (https://www.excelbanter.com/excel-programming/422112-3-different-hyperlinks-attached-same-cell.html)

Dan Tabla[_2_]

3 different hyperlinks attached to the same cell?
 
I need to attach 3 different hyperlinks to the same cell.
When I click on the cell I need to open 3 different web pages in the same
time.
Thanks a lot!

Bob Umlas, Excel MVP

3 different hyperlinks attached to the same cell?
 
You can't do it with a regular hyperlink, but you can do it with VBA code,
something like this -- right-click the sheet tab, select View Code, put this
in (assumes the cell inquestion is F4):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$F$4" Then
ThisWorkbook.FollowHyperlink "http://www.whatever.com",
NewWindow:=True
ThisWorkbook.FollowHyperlink "http://www.xyz.com", NewWindow:=True
ThisWorkbook.FollowHyperlink "http://www.abc.com", NewWindow:=True
End If
End Sub

"Dan Tabla" wrote:

I need to attach 3 different hyperlinks to the same cell.
When I click on the cell I need to open 3 different web pages in the same
time.
Thanks a lot!


Dan Tabla[_2_]

3 different hyperlinks attached to the same cell?
 
Bob, God bless you! It's working and very easy!
Compile succesfully!
"Bob Umlas, Excel MVP" wrote:

You can't do it with a regular hyperlink, but you can do it with VBA code,
something like this -- right-click the sheet tab, select View Code, put this
in (assumes the cell inquestion is F4):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$F$4" Then
ThisWorkbook.FollowHyperlink "http://www.whatever.com",
NewWindow:=True
ThisWorkbook.FollowHyperlink "http://www.xyz.com", NewWindow:=True
ThisWorkbook.FollowHyperlink "http://www.abc.com", NewWindow:=True
End If
End Sub

"Dan Tabla" wrote:

I need to attach 3 different hyperlinks to the same cell.
When I click on the cell I need to open 3 different web pages in the same
time.
Thanks a lot!



All times are GMT +1. The time now is 11:28 AM.

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