I\'m trying to get some data out of this Webpage:
http://www.vodafone.de/privat/handys-tablets-tarife/smartphone-tarife.html
I want to have the whole table on t
Instead of:
Do
DoEvents
Loop Until ie.readyState = READYSTATE_COMPLETE
You could try:
Do While ie.Busy: DoEvents: Loop
Do Until ie.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
with ie
...
end with
instead of using the IE automation you can also use a http request object:
Dim oRequest As Object
Set oRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
oRequest.Open "GET", "http://www.vodafone.de/privat/handys-tablets-tarife/smartphone-tarife.html"
oRequest.Send
MsgBox oRequest.ResponseText
it's faster and doesn't need as many ressources as the solution with the IE
if you are behind a proxy server you can use something like this:
Const HTTPREQUEST_PROXYSETTING_PROXY = 2
Dim oRequest As Object
Set oRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
oRequest.setProxy HTTPREQUEST_PROXYSETTING_PROXY, "http://proxy.intern:8080"
oRequest.Open "GET", "http://www.vodafone.de/privat/handys-tablets-tarife/smartphone-tarife.html"
oRequest.Send
MsgBox oRequest.ResponseText
of course you have to adjust the proxy to your values.
As you are interessted in a german page here also a short explanation in german language: http://cboden.de/softwareentwicklung/vba/tipps-tricks/27-webseite-per-vba-ansprechen There is also explained how to pass values of a form to the webserver which might also be helpfull for you.