Below is the code I wrote. Is this correct?
Or is there a way to get ONLY the ONE record being downloaded by DownloadHistoryData, withOUT having to iterate through all of ticker.HistoryData AFTER calling DownloadHistoryData? It would be something similar to the following [ Set HistoryRecs = ticker.DownloadHistoryData HistoryStartDate, HistoryEndDate ].
Here's my code...
HistoryStartDate = "7/20/10"
HistoryEndDate = "7/20/10"
ticker.SetProperty "HistoryStart", HistoryStartDate
ticker.SetProperty "HistoryEnd", HistoryEndDate
On Error Resume Next
ticker.DownloadHistoryData HistoryStartDate, HistoryEndDate
On Error Goto 0
Set HistoryRecs = ticker.HistoryData
MsgBox "HistoryRecs.Count: " & HistoryRecs.Count, vbOKOnly, "Msg"
The MsgBox from the above code displays: "HistoryRecs.Count: 180", which is the total number of History records on-file (locally). These must be read through one at a time, looking for the ONE date I want, which seems silly. That's why I'm asking if there is another way to code what I want.
Also ... every time a new record is added to local history, via ticker.DownloadHistoryData, the HistoryRecs.Count value displayed increases by several digits, NOT just ONE digit.