title: VBA code to know URL validity that will check whether URL is exist or not
body: <p>I have code to know the URL existence but in many other systems or may another office version it is not working. could please help me with this? Where is im doing wrong? Is there an alternate option? Thanks in advance
  I am using code to know URL VALIDITY is</p>
  
  <pre><code>Public Function IsURLGood(URL As String) As Boolean
  Dim request As New WinHttpRequest
  
  On Error GoTo IsURLGoodError
  request.Open "HEAD", URL
  request.send
  If request.Status = 200 Then
      IsURLGood = True
  Else
      IsURLGood = False
  End If
  Exit Function
  
  IsURLGoodError:
  IsURLGood = False
  End Function
  </code></pre>
  
  <p>To check URL existence</p>
  
  <pre><code>If IsURLGood(Sheet1.Range("D10")) Then
  'MsgBox "correct"
  Else
  MsgBox "URL is invalid."
      End If
  </code></pre>