Some code alternative ideas based on the ramblings in the last post.
(Occasionally I will use named arguments :=__, _____:=____, ____ := ___ as alternative sometimes to ___ , ____, ____ as the name can help to give a bit of info, but there is no particular significance to that )
Option 1
I read this in a few places_.....
“.....This .open method is synchronous or asynchronous, depending on the value of the varasync:= parameter in the open method call. The True/False argument of the HTTP Request is the Asynchronous mode flag. If set False then control immediately returns to VBA after Send is executed. If set True then control is returned to VBA after the server has sent back a response.....”
I do not know what that bollox means , but maybe :
If .open is called with varasync:=False, this call does not return until the entire response is received or something times out, bombs out , crashes or, whatever....
If .open is called with varasync:= True, this call returns immediately to the code "running" , ( VBA or whatever ? ).
Let’s say some Niggly little thing tries to be done that you do not want or need but never never gets done, ( like someone spying to get all your personal data ). With False you may wait for ever until something times out or hangs up, crashes etc... .
So try a True
‘ 1a)
‘ 1 b)
‘1c) , ‘1d) maybe try the above two with “GET”
_...........................
Option 2
‘2) just some guesses with a .setRequestHeader
‘2a)
‘2b)
‘2c) ‘2d) etc...etc.... varasync:=False in the above two and then variations of the While and Wait stuff......
_......................
Option 3 .....
_..
I notice in Post #1 you use MSXML2.xmlhttp and in Post #6 MSXML2.ServerXMLHTTP
Trying to understand from a google search the difference in those does my head in. But they do mention that MSXML2.ServerXMLHTTP is better for between servers but that it does not have some auto recognising stuff. I notice that trying to use my .html Full path and File name String idea instead of the Web site http URL dies not work with .ServerXMLHTTP _... so maybe it does not “recognise” my .html File and only has “eyes” for a Web site URL. Laymen thought is that it is more “narrow minded”, and does not get distracted and less susceptible to missing s sss.. sss sir security , bit I have not the slightest idea what I am talking about there,.... - I just dreamt It up.
Option 4 .....
_.. from last post # 15

Pseudo code: !!!

Alan
P.s. A last “DE.request” from me @ ExcelWombat, .. maybe you might want to change your Thread title to
“Web Scrapping . Error - 2147024891 Access Denied”. This might catch the attention of some other Web experts here that may have some input
http://www.excelforum.com/showthread.php?t=1125967
Bookmarks