+ Reply to Thread
Results 1 to 3 of 3

Dynamic Hyperlinks

Hybrid View

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Dynamic Hyperlinks

    Hi

    Try following code. I assumed list of files in Sheet1, Column A and starts from Cell "A2". If not, you can update it accordingly. I hope it will help. Cheers!!!

    Sub Add_Hyperlink()
        
    Dim Lrow As Integer
    Dim iR As Integer
    
    Lrow = Sheet1.Range("A" & Rows.Count).End(xlUp).Row
        
        For iR = 2 To Lrow
        
            If Cells(iR, 1) <> "" Then
        
                Sheet1.Hyperlinks.Add Anchor:=Cells(iR, 1), _
                Address:="C:\Users\Myself\Documents\Data Files\" & Cells(iR, 1).Value & ".pdf", _
                TextToDisplay:=Cells(iR, 1).Value
    
            End If
    
        Next iR
    
    End Sub
    Last edited by arunsjain; 03-26-2021 at 12:10 AM.

  2. #2
    Registered User
    Join Date
    11-15-2012
    Location
    Anchorage, AK
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Dynamic Hyperlinks

    Thank you Arunsjain, that worked!

+ 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. Automatic Dynamic Hyperlinks
    By Everest3788 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2016, 10:53 AM
  2. Creating dynamic hyperlinks with VBA.
    By excellenthelp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2013, 08:25 AM
  3. Dynamic hyperlinks to other sheets within workbook?
    By manoop1856 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2012, 01:36 PM
  4. Dynamic Hyperlinks
    By lordfa9 in forum Excel General
    Replies: 4
    Last Post: 06-26-2010, 10:31 PM
  5. Dynamic Hyperlinks
    By anar_baku in forum Excel General
    Replies: 1
    Last Post: 12-04-2006, 09:36 AM
  6. [SOLVED] Dynamic hyperlinks not working
    By Rohan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2006, 10:08 AM
  7. Dynamic hyperlinks problem
    By Mr.Plankton in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-21-2006, 10:20 AM

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