Problem with VBA integration and Internet Explorer

1

I'm trying to use VBA to collect data directly from the internet. I have seen several examples of using the InternetExplorer Object, as below:

Dim IE as Object
Set IE  = New InternetExplorer

IE.navigate "http://www.minhapagina.com.br"

html = IE.Document

So I could manipulate the 'html' Object and get the data I need, however, the 'Document' object is always empty. How to proceed?

    
asked by anonymous 29.07.2015 / 00:50

1 answer

2

Check for help:

Dim IE As InternetExplorer
Dim ieDoc As Object
Set IE  = New InternetExplorer
IE.Visible = True 'para verificar se abre o browser
IE.navigate "http://www.minhapagina.com.br"

'possivelmente esta é a parte que te falta
Do While IE.Busy: DoEvents: Loop
Do Until IE.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop

Set ieDoc = ieApp.Document

A good example: Get Data from Website that Requires Login

    
29.07.2015 / 11:37