Excel 2007: Hyperlinks

Hello Experts,

    I'm curious, is it possible to hyperlink the contents of a cell to open up two different URL's when clicked on?  I have a topic I'm using and have created a hyperlink from that topic but there are several good references I'd like to point it to.  

    In a perfect world, my reader could just click on the topic hyperlink and multiple tabs would open showing it's reference URL's.  Is this possible in Excel?
itsmevicAsked:
Who is Participating?
 
jppintoCommented:
You can simulate this with the following code.

Take a look at the sample attached file. Click on cell A1 and it will open 2 tab on your browser.

jppinto
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Target.Address = "$A$1" Then
        ActiveWorkbook.FollowHyperlink Address:="http://www.google.com", NewWindow:=True
        ActiveWorkbook.FollowHyperlink Address:="http://www.yahoo.com", NewWindow:=True
    End If
    
End Sub

Open in new window

Click-me.xlsm
0
 
StephenJRCommented:
I don't think so. You could link to another location with further links in separate cells perhaps?
0
 
itsmevicAuthor Commented:
Very cool jppinto!  Thank you!  I'm wondering, could one perhaps expend that to say open three or even four by just adding additional  "ActiveWorkbook.FollowHaperlink...."  lines?  Not that it's a big deal as two is more than sufficient just curious.  Awesome input thank you again!  
0
 
jppintoCommented:
Yes, just add additional lines to your code and it will open additional tabs on your browser.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.