+ Reply to Thread
Results 1 to 2 of 2

Automated hyperlinks

Hybrid View

  1. #1
    Registered User
    Join Date
    09-15-2010
    Location
    Goettingen, Germany
    MS-Off Ver
    Excel 2010
    Posts
    4

    Automated hyperlinks

    hi,

    in excel I have a list of file names I have in a folder. my excel file is also in this folder.
    I carry this folder to different locations on my computer from time to time. here is the question.

    is it possible to write a macro that looks where the excel file is, conjugates with the file list I have, and turn them into hyperlinks, and colors the hyperlink different if the file doesn't exist in the folder.

    It would be great if you can help,

    Thanks

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Automated hyperlinks

    Maybe this macro will help.

    Sub Refresh()
    For N = 1 To ActiveSheet.Hyperlinks.Count
        If Dir(ThisWorkbook.Path & "\" & ActiveSheet.Hyperlinks(N).Address) = "" Then
            ActiveSheet.Hyperlinks(N).Range.Font.ColorIndex = 3
        Else
            ActiveSheet.Hyperlinks(N).Range.Font.ColorIndex = 4
        End If
    Next N
    End Sub
    Martin

+ 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