Windows Vista Tips

Windows Vista Tips > Newsgroups > Internet Explorer > VBA IExplorer get status

Reply
Thread Tools Display Modes

VBA IExplorer get status

 
 
Jürgen Meyer
Guest
Posts: n/a

 
      05-19-2013
I want to check whether a website exists or not.
I already have seen the following method:

Set opjApp = CreateObject("MSXML2.XMLHTTP")
With objApp
strRequest = strurl & strAddress
.Open strRequest, False
.send
If .status = 200 Then …

But I want to do a different thing:

Set objApp = CreateObject("InternetExplorer.Application")
With objApp
.navigate url:="http://goo.gl/maps/fbsS33"

How to get the status at this point?

I do not talk about
..Busy or .ReadyState
ReadyState only checks whether a website has been loaded completely or not.

Regards
Juergen
 
Reply With Quote
 
 
 
 
Mayayana
Guest
Posts: n/a

 
      05-19-2013
If you have a method that works then why do
you need another? IE is not really designed to
give you access to the server conversation. What
if you get a 302 redirect instead of a 200? You'd
never know that. IE takes care of it transparently.
Or you could get a 404 that redirects you to a custom
error page. You'd get a 200 on that page and load an
apparently valid webpage, but it would really be a
404. I think the only way to check in IE would be
to wait for document_complete and then check for
the document content you're expecting.

"Jürgen Meyer" <> wrote in message
news:...
|I want to check whether a website exists or not.
| I already have seen the following method:
|
| Set opjApp = CreateObject("MSXML2.XMLHTTP")
| With objApp
| strRequest = strurl & strAddress
| .Open strRequest, False
| .send
| If .status = 200 Then .
|
| But I want to do a different thing:
|
| Set objApp = CreateObject("InternetExplorer.Application")
| With objApp
| .navigate url:="http://goo.gl/maps/fbsS33"
|
| How to get the status at this point?
|
| I do not talk about
| .Busy or .ReadyState
| ReadyState only checks whether a website has been loaded completely or
not.
|
| Regards
| Juergen


 
Reply With Quote
 
 
 
 
Jürgen Meyer
Guest
Posts: n/a

 
      05-19-2013
Thanks for the answer.
Good arguments, but:

I call the IExplorer invisible to retrieve some information from a website
automatically and to store it in a database.
So the program needs some feedback to cancel the call if the operation was not
successful.

Juergen

On Sun, 19 May 2013 09:12:47 -0400, "Mayayana" <>
wrote:

> If you have a method that works then why do
>you need another? IE is not really designed to
>give you access to the server conversation. What
>if you get a 302 redirect instead of a 200? You'd
>never know that. IE takes care of it transparently.
>Or you could get a 404 that redirects you to a custom
>error page. You'd get a 200 on that page and load an
>apparently valid webpage, but it would really be a
>404. I think the only way to check in IE would be
>to wait for document_complete and then check for
>the document content you're expecting.
>
>"Jürgen Meyer" <> wrote in message
>news:.. .
>|I want to check whether a website exists or not.
>| I already have seen the following method:
>|
>| Set opjApp = CreateObject("MSXML2.XMLHTTP")
>| With objApp
>| strRequest = strurl & strAddress
>| .Open strRequest, False
>| .send
>| If .status = 200 Then .
>|
>| But I want to do a different thing:
>|
>| Set objApp = CreateObject("InternetExplorer.Application")
>| With objApp
>| .navigate url:="http://goo.gl/maps/fbsS33"
>|
>| How to get the status at this point?
>|
>| I do not talk about
>| .Busy or .ReadyState
>| ReadyState only checks whether a website has been loaded completely or
>not.
>|
>| Regards
>| Juergen
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA FileCopy hangs with UAC FPS, Romney Windows Vista Security 6 07-14-2008 07:54 PM
VBA Function not recognized in Excel SlicerRod Windows Vista General Discussion 3 01-04-2008 01:25 PM
Timer event failing sporadically -- Office 2007 VBA Tech_vs_Life Windows Vista General Discussion 4 07-02-2007 02:32 PM
VBA run-time error 3170: Could not find installable ISAM Rod Windows Vista General Discussion 0 04-03-2007 09:22 PM
VBA and Vista compatibility issues EdH Windows Vista General Discussion 3 03-14-2007 04:36 PM