+ Reply to Thread
Results 1 to 7 of 7

Hyperlinks & Drop down menu

  1. #1
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    Hyperlinks & Drop down menu

    I have a list of Hyperlinks in cells A1 to A25.
    I have named this cell range as 'proliants'.
    I've created a dropdown menu that displays this range but it only displays them
    as normal text and not as a list of Hyperlinks.
    Can this be achieved in a dropdown menu, comboBox or anything else?
    I want to be able to select a Hyperlink from the menu, and away she goes.

  2. #2
    Dave Peterson
    Guest

    Re: Hyperlinks & Drop down menu

    You could use an adjacent helper cell that contains a formula like:

    =if(x1="","",hyperlink(x1))

    (where x1 contains the data|validation (is that what you used for the
    dropdown?))

    Or you could plop a button near the dropdown that does the linking.

    I'd put a little button from the Forms toolbar next to the dropdown.

    I'd assign this macro to it:

    Option Explicit
    Sub testme()
    With ActiveSheet.Range("a1")
    If .Value = "" Then
    'do nothing
    Else
    ActiveWorkbook.FollowHyperlink Address:=.Value
    'or depending on what's in that list
    'ActiveWorkbook.FollowHyperlink Address:="Http://" & .Value
    End If
    End With
    End Sub



    grahammal wrote:
    >
    > I have a list of Hyperlinks in cells A1 to A25.
    > I have named this cell range as 'proliants'.
    > I've created a dropdown menu that displays this range but it only
    > displays them
    > as normal text and not as a list of Hyperlinks.
    > Can this be achieved in a dropdown menu, comboBox or anything else?
    > I want to be able to select a Hyperlink from the menu, and away she
    > goes.
    >
    > --
    > grahammal
    > ------------------------------------------------------------------------
    > grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
    > View this thread: http://www.excelforum.com/showthread...hreadid=537163


    --

    Dave Peterson

  3. #3
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    Hyperlinks

    I have tried both methods but no joy yet.

    My Hyperlink list is in cells A2 to A60. I've named this range ' proliant '.
    All these links are to Word documents on the same drive.

    My drop down menu is in cell C10 and was created using Data/Validation.
    I tried putting =if(C10="","",hyperlink(C10)) in cell C12 but I get a 'Cannot open the specified file' message.

    I created a Button from the Forms menu and put the following in it.

    Option Explicit
    Sub testme()
    With ActiveSheet.Range("C10")
    If .Value = "" Then
    'do nothing
    Else
    ActiveWorkbook.FollowHyperlink Address:=.Value
    'or depending on what's in that list
    'ActiveWorkbook.FollowHyperlink Address:="Http://" & .Value
    End If
    End With
    End Sub

    This errors at the
    ActiveWorkbook.FollowHyperlink Address:=.Value
    line.

    Any clues??

  4. #4
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154
    Have modified the
    ActiveWorkbook.FollowHyperlink Address:=.Value
    line to read
    ActiveWorkbook.FollowHyperlink Address:="D:\Downloads\HP ProLiant Spare parts\" & .Value
    This is where all the Word Docs are.
    Still no joy.
    Do I need to add a '.doc' extention to it perhaps, if so, how?

  5. #5
    Dave Peterson
    Guest

    Re: Hyperlinks & Drop down menu

    Maybe...

    ActiveWorkbook.FollowHyperlink _
    Address:="file:////" & "D:\Downloads\HP ProLiant Spare parts\" & .Value

    (Watch the folder name--I wasn't sure about the spaces.)

    grahammal wrote:
    >
    > Have modified the
    > ActiveWorkbook.FollowHyperlink Address:=.Value
    > line to read
    > ActiveWorkbook.FollowHyperlink Address:="D:\Downloads\HP ProLiant Spare
    > parts\" & .Value
    > This is where all the Word Docs are.
    > Still no joy.
    > Do I need to add a '.doc' extention to it perhaps, if so, how?
    >
    > --
    > grahammal
    > ------------------------------------------------------------------------
    > grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
    > View this thread: http://www.excelforum.com/showthread...hreadid=537163


    --

    Dave Peterson

  6. #6
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    Hyper****links

    Have applied modied line, still no go.

  7. #7
    Dave Peterson
    Guest

    Re: Hyperlinks & Drop down menu

    Maybe your data isn't what you posted.

    grahammal wrote:
    >
    > Have applied modied line, still no go.
    >
    > --
    > grahammal
    > ------------------------------------------------------------------------
    > grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
    > View this thread: http://www.excelforum.com/showthread...hreadid=537163


    --

    Dave Peterson

+ 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