+ Reply to Thread
Results 1 to 9 of 9

Checking for broken URLs

  1. #1
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Checking for broken URLs

    Hello,
    I have an excel sheet with several hundred URLs, which I need to check if are broken.
    I'm having difficulties finding a function which would do exacly that, check if a file over a site (http://...) is still valid or reports a broken link. All the sites are sites over the local network.

    I've tried using both the FileSystemObject and Dir function, and still came up with nothing.

    Any way I can modify one of those commands or an alternative way to suit my needs?

    Thanks a lot.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Checking for broken URLs

    Try this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Checking for broken URLs

    It returns false every time, and I can see it reaches the end of the case switch as I tried changing the message in the iif part.
    Maybe it's due to the fact that they're microsoft sharepoint sites? Or a slow network resulting the status not being resolved in time?

    Thanks a lot

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Checking for broken URLs

    I dunno. Try it with a garden-variety URL.

  5. #5
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Checking for broken URLs

    Now I see...
    Apparently the command is trying to access that page not from the user account which activated it, but from something else, and so I get error 401, unauthorized access.
    Is there a way to force the .send command to do so under a certain user account provided the name and password?

    Damn, just realised it's even more complex than I originally thought, as in a couple of months, my company is implemanting an authorization system which requires a smart card login. So the only way is if I can force the command into using the already logged on cerdentials as if I'm opening the site manually.
    Last edited by excelforum123; 01-12-2011 at 05:33 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Checking for broken URLs

    Perhaps, or probably, but I don't know how, sorry.

  7. #7
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Checking for broken URLs

    Thanks a lot for all your help.
    I'll try and get it using some trial and error and the microsoft help sections.

  8. #8
    Registered User
    Join Date
    10-31-2011
    Location
    Austin, Tx
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Checking for broken URLs

    Quote Originally Posted by shg View Post
    Try this:
    Please Login or Register  to view this content.
    So I may be reviving a dead horse here, but I have essentially the same problem. However, my urls are not local network. Either way, I copied and pasted the above Macro exactly as written, but when I open the Run Macro feature, it won't show the Macro as an option to run. What am I doing wrong?

  9. #9
    Registered User
    Join Date
    10-09-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Checking for broken URLs

    I get the same error with all of the URLs. I am looking at links to documents on my company's intranet, which may be the issue.
    Last edited by Windsong86; 10-09-2013 at 02:37 PM.

+ 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