Help, importing most current data from web query

Q

qitrader888

I have the following code but how do i edit this macro that will allo
me to do a web query on the most recent data. For example, I just nee
the high, low, close of stock X as of Feb 27th. So on the web query,
only need the following data in my sheet:
Date Open High LowClose Volume Adj. Close*
Feb-26-04 49.7 50.8249.2950.5 3,342,100 50.5


Thanks in advance and any help is appreciated.

Sub Stock1()

Dim CoSym As String

CoSym = Worksheets("Main").Range("C3").Value

With Sheets("Stock 1").QueryTables(1)
.Connection = _
"URL;http://table.finance.yahoo.com/k?s=" & CoSym
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = True
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With

End Su
 
Top