![]() |
testing url string
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 |
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 |
testing url string
thanks to both of you "Steve Yandl" wrote: 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 |
All times are GMT +1. The time now is 11:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com