+ Reply to Thread
Results 1 to 5 of 5

drop down list with hyperlinks

Hybrid View

  1. #1
    Registered User
    Join Date
    12-26-2013
    Location
    Sacramento
    MS-Off Ver
    Excel 2010
    Posts
    2

    drop down list with hyperlinks

    Hi,

    I'm trying to create a drop down list where each line of the drop down list has a hyperlink to a different document. I am using Excel 2019, with Microsoft Windows 7. I already know how to create the drop down list, it the hyperlink to each line (about 50) on the drop down list that I can't figure out.

    Thanks

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: drop down list with hyperlinks

    Hi,

    Can you post a sample of the workbook? You can remove sensitive data. What does the hyperlink do? Open a document or go to a specific place on the current document. Is there a relationship between the value and the hyperlink.

    Thanks

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: drop down list with hyperlinks

    How are you creating the drop down list?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    12-26-2013
    Location
    Sacramento
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: drop down list with hyperlinks

    I'm just using the basic drop down list creation using data validation. I'm trying to create hyperlinks to documents on a SharePoint site, or a common drive. Attached is a non-sensitive sample of how I'm creating the drop down list.

    Thanks!
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: drop down list with hyperlinks

    Hi,

    See if this helps:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Dim sPath As String
    Dim sExt As String
    
    ' Set the default path and the extensions of the file
    sPath = "C:\MyFolder\"
    sExt = ".xlsx"
    
    If Target.Column <> 1 Then Exit Sub
    
    Application.EnableEvents = False
        ' Add the hyperlink
        Target.Hyperlinks.Add Anchor:=Target, _
                              Address:=sPath & Target.Value & sExt, _
                              TextToDisplay:=Target.Value
    Application.EnableEvents = True
    
    End Sub
    You will have to place this code under the sheet where the list is module.
    To go there press F11 and the to the left double click the sheet name. Paste the code in the white area.

    sample.xlsm

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can I use hyperlinks in a drop down list
    By Lynneth in forum Excel General
    Replies: 4
    Last Post: 01-22-2014, 06:08 AM
  2. IF Formula using drop down list and hyperlinks
    By sharper1989 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2012, 08:02 AM
  3. [SOLVED] hyperlinks:Drop Down List
    By lsmft in forum Excel General
    Replies: 2
    Last Post: 02-18-2007, 09:08 AM
  4. [SOLVED] Multiple hyperlinks from drop down list
    By lauren_roberts08 in forum Excel General
    Replies: 0
    Last Post: 06-13-2006, 10:25 AM
  5. Drop down list with hyperlinks...
    By jtho13 in forum Excel General
    Replies: 1
    Last Post: 01-29-2006, 03:20 AM

Tags for this Thread

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