ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Parsing Data From HTML Source into Excel using VBA (https://www.excelbanter.com/excel-programming/271202-parsing-data-html-source-into-excel-using-vba.html)

Peter Dickson

Parsing Data From HTML Source into Excel using VBA
 
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



Lynn Schauer

Parsing Data From HTML Source into Excel using VBA
 
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



"Peter Dickson" wrote in message
. ..
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






All times are GMT +1. The time now is 09:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com