View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl[_3_] Steve Yandl[_3_] is offline
external usenet poster
 
Posts: 117
Default testing url string

Here is an alternate approach

'-----------------------------------

Sub CheckMyURL()
Dim strURL As String

strURL = "http://www.google.com/"

On Error Resume Next
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
objHTTP.Open "GET", strURL, False
objHTTP.Send

If objHTTP.statusText < "OK" Then
MsgBox "Possible problem with the URL"
Else
MsgBox "URL checks out"
End If

Set objHTTP = Nothing

End Sub

'-----------------------------------

Steve Yandl



"thomas donino" wrote in message
...
I have a macro that works fine except sometimes the website comes up with
another logon screen. How can I test for a specific url string to see if
thats the current webpage address, so that if it is , I can resend the
user/pass .

Thank you