Hello Gents!
I've just joined the big family of this forum, nice to meet everyone here!
I am writing a Macro code which could extract historical stock data of Hong Kong according to the date entered by a user.
This is the data of the page I wish to extract from:
http://finance.yahoo.com/q/hp?s=3888...torical+Prices
Suppose I am only interested in the historical data of this page, how can I direct my program to obtain a certain value, let's say the "Close Price" of "Jun 11, 2012" A part of the html code which includes the data I need looks like this:
I have written some very basic web data extraction code before (shown below) but I have no idea for this one.
My previous code:
Dim IE As New InternetExplorer
IE.Visible = True
IE.navigate "http://hk.finance.yahoo.com/q?s=0388&ql=1"
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Set doc = IE.document
Dim sDD As String
sDD = Trim(doc.getElementsByTagName("span")(22).innerText)
MsgBox sDD
Any help would be VERY VERY MUCH appreciated!!!!
Many thanks,
Gordon
Bookmarks