Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing for a string of zero bytes simonc Excel Programming 4 April 30th 09 12:36 PM
testing a string for either "Minutes" and/or hours and extracting the values Bruce[_2_] Excel Programming 5 May 18th 07 08:05 PM
Testing same cell across multiple sheets for a string and counting each instance? [email protected] Excel Worksheet Functions 5 March 8th 07 02:57 PM
testing for a string type 6e Excel Programming 1 July 20th 06 06:02 PM
Testing a string array for any values Chris W. Excel Programming 9 March 21st 05 02:13 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"