Thread: Google query
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Google query

Hi Group,

The following quesry works, but is not bringing in the data I expected and
want.
It bring in May 29, 2009 through Jun 2, 2008.

Looking for a single day. 5/29/2007, the parameters are as follows:
StartMo = Month(startdate)
StartDay = Day(startdate)
StartYr = Year(startdate)
StopMo = Month(startdate)
StopDay = Day(startdate)
StopYr = Year(startdate)
The code is below:

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://finance.google.com/finance/historical?histperiod=daily&q=" _
& sym & "&startdate=" _
& StartMo & "+" & StartDay & "%2C+" & StartYr _
& "&enddate=" _
& StopMo & "+" & StopDay & "%2C+" & StopYr & "&output=csv",
Destination:=Range("E3"))
.Refresh BackgroundQuery:=False
End With

Thanks for your help,
David