+ Reply to Thread
Results 1 to 2 of 2

Drop down list with hyperlinks...

  1. #1
    Registered User
    Join Date
    01-28-2006
    Posts
    1

    Drop down list with hyperlinks...

    I have created a drop down list but I would like to make each data in the list have a hyperlink within the same workbook.

    Can this be done? If so any advice would be greatly appreciated.

    Joseph

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Joseph,

    Add a module to your project and copy the following macro code into it. Put the hyperlinks into the Drop Down's List Range and assign the macro to the Drop Down. When you select a item in the Drop Down, the hyperlink will be activated.

    Sub GoToHyperlink()

    Dim DropDownName
    Dim LinkName

    On Error GoTo NoLink

    DropDownName = Application.Caller

    With ActiveSheet.Shapes(DropDownName).ControlFormat
    LinkName = .List(.ListIndex)
    End With

    ActiveSheet.Hyperlinks(LinkName).Follow

    Exit Sub

    NoLink:
    MsgBox "Hyperlink " & LinkName & " not found.", vbExclamation

    End Sub

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1