Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 286153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:36:39+00:00 2026-05-12T05:36:39+00:00

The title says it: I have an excel Sheet with an column full of

  • 0

The title says it:

I have an excel Sheet with an column full of hyperlinks. Now I want that an VBA Script checks which hyperlinks are dead or work and makes an entry into the next columns either with the text 404 Error or active.

Hopefully someone can help me because I am not really good at VB.

EDIT:

I found @ http://www.utteraccess.com/forums/printthread.php?Cat=&Board=84&main=1037294&type=thread

A solution which is made for word but the Problem is that I need this solution for Excel. Can someone translate this to Excel solution?

Private Sub testHyperlinks()
    Dim thisHyperlink As Hyperlink
    For Each thisHyperlink In ActiveDocument.Hyperlinks
        If thisHyperlink.Address <> "" And Left(thisHyperlink.Address, 6) <> "mailto" Then
            If Not IsURLGood(thisHyperlink.Address) Then
                Debug.Print thisHyperlink.Address
            End If
        End If
    Next
End Sub


Private Function IsURLGood(url As String) As Boolean
    ' Test the URL to see if it is good
    Dim request As New WinHttpRequest

    On Error GoTo IsURLGoodError
    request.Open "GET", url
    request.Send
    If request.Status = 200 Then
        IsURLGood = True
    Else
        IsURLGood = False
    End If
    Exit Function
IsURLGoodError:
        IsURLGood = False
End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:36:39+00:00Added an answer on May 12, 2026 at 5:36 am

    First add a reference to Microsoft XML V3 (or above), using Tools->References. Then paste this code:

    Option Explicit
    
    Sub CheckHyperlinks()
    
        Dim oColumn As Range
        Set oColumn = GetColumn() ' replace this with code to get the relevant column
    
        Dim oCell As Range
        For Each oCell In oColumn.Cells
    
            If oCell.Hyperlinks.Count > 0 Then
    
                Dim oHyperlink As Hyperlink
                Set oHyperlink = oCell.Hyperlinks(1) ' I assume only 1 hyperlink per cell
    
                Dim strResult As String
                strResult = GetResult(oHyperlink.Address)
    
                oCell.Offset(0, 1).Value = strResult
    
            End If
    
        Next oCell
    
    
    End Sub
    
    Private Function GetResult(ByVal strUrl As String) As String
    
        On Error Goto ErrorHandler
    
        Dim oHttp As New MSXML2.XMLHTTP30
    
        oHttp.Open "HEAD", strUrl, False
        oHttp.send
    
        GetResult = oHttp.Status & " " & oHttp.statusText
    
        Exit Function
    
    ErrorHandler:
        GetResult = "Error: " & Err.Description
    
    End Function
    
    Private Function GetColumn() As Range
        Set GetColumn = ActiveWorkbook.Worksheets(1).Range("A:A")
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like the title says, I want to have a HTML table that allows its
As the title says, I want to have a build tool that quite much
I just want what my title says.I have already read all the previous similar
The title says it mostly. If I have an object in Python and want
The title says enough I think. I have a full quality BufferedImage and I
I have written a code which does the thing as the title says. The
Ok, so as the title says, I have an HTML page that I fetch
The title more or less says it all: I have a function which takes
As the title says I have a list of Django objects and I want
-- Hello, just ast the title says. I have a downloader class that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.