+ Reply to Thread
Results 1 to 4 of 4

Checking for broken hyperlinks to documents on harddisk and no websites

  1. #1
    Registered User
    Join Date
    02-23-2016
    Location
    Ghent, Belgium
    MS-Off Ver
    2007
    Posts
    2

    Checking for broken hyperlinks to documents on harddisk and no websites

    Good morning all,

    I am putting together an excel document in which I have a a few thousand hyperlinks made with the HYPERLINK function to pictures on my harddisk.
    I found a solution on this forum for "normal" hyperlinks but it doesn't work if the hyperlink is made with the Hyperlink function !

    I want to find out which hyperlinks are not working. Now I do this one by one and each time looking if the excel pop up "file cannot be found" pops up or not.
    But I am feeling like a monk in the "middle ages"

    My question is, is there a way to automatically check a range of cells to ensure none of the links are broken, and if there are broken links, which ones they are by coloring them ?

    Thanks for your support !
    Last edited by Wtco; 09-08-2016 at 04:27 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Checking for broken hyperlinks to documents on harddisk and no websites

    This code will change all cells with invalid HYPERLINK references to red fill. This is a permanent change, not conditional formatting.

    This code has to make assumptions about how you are using HYPERLINK because it needs to parse the formula. It assumes that the first argument is a string. If instead you are referencing a cell, the code has to be different. I have tested this, but your file could be different.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Checking for broken hyperlinks to documents on harddisk and no websites

    Also: I tested this only with file system references, not with HTTP URLs.

  4. #4
    Registered User
    Join Date
    02-23-2016
    Location
    Ghent, Belgium
    MS-Off Ver
    2007
    Posts
    2

    Re: Checking for broken hyperlinks to documents on harddisk and no websites

    Dear Sir,

    thank you already for the help.
    In order to find the solution I send you a simplified example excel file with some named pictures to be put in your directory C:\Users\Public\Pictures\Sample Pictures\
    In the excel file you can see the way how I make the hyperlinks.

    It seems that this way is very important to make a macro that is working well.
    I thought the solution would be a general one, working with all kinds of hyperlinks no matter how they are made ("assembled")

    Could you be so kind to have a look at the file ?
    I am no VBA programmer but a newbie.


    Philippe

    I hope the attachment are really attached because the attach button of the forum doesn't seem to work well.
    Attached Images Attached Images
    Attached Files Attached Files

+ 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. [SOLVED] Checking for broken hyperlinks
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 06-22-2018, 02:46 PM
  2. Detecting broken hyperlinks
    By GreenWheels in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-21-2016, 12:16 AM
  3. Broken hyperlinks to files
    By biederboat in forum Excel General
    Replies: 8
    Last Post: 12-10-2014, 06:46 PM
  4. Checking for broken URLs
    By excelforum123 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-09-2013, 02:25 PM
  5. Replies: 1
    Last Post: 03-01-2010, 09:17 AM
  6. Broken hyperlinks
    By Nigel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-16-2008, 05:34 AM
  7. [SOLVED] Error on hyperlinks to external websites
    By Ben in forum Excel General
    Replies: 0
    Last Post: 09-27-2005, 08:05 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