Parsing Data From HTML Source into Excel using VBA

P

Peter Dickson

I am trying to parse some data from some HTML web pages using VBA for Excel
(2002) but cannot
remember the function to open the web pages and assign the source info to a
variable in VBA. Does anyone know how to do this?

Thanks
 
L

Lynn Schauer

Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://www.yahoo.com" 'place your desired URL here
IE.Visible = True 'if you want to see the browser window, but not
necessary
While IE.Busy
DoEvents
Wend
x = IE.document.body.innerHTML
IE.Quit
'now the HTML code BODY your looking for is in the variable x

you will need to add a reference to the msinet.ocx before using

Lynn S
 
Top