Hi,
I use the Basic AdxHistory.xlsm Makro in order to download daily closing price for some instrument. I get only the dates, when the price was published. However, I need the complete time series, where holidays and weekends are also present. What do I do? I would expect the .Mode property, but it does not help. Small example how I want to see it:
Friday - 100
Saturday - NA
Sunday - NA
Monday - 110
Instead I see:
Friday - 100
Monday - 110
Here is the macro.
Option Explicit
Dim WithEvents myAdxRtHist As AdfinXRtLib.AdxRtHistory
'*********INTERDAY*********************
Private Sub cmdGetInterday_Click()
Dim arrFlds() As Variant
ActiveCell.Select
' Note the use of CreateReutersObject - function in the PLVbaApis module.
If myAdxRtHist Is Nothing Then Set myAdxRtHist = CreateReutersObject("AdfinXRtLib.AdxRtHistory")
On Error GoTo errHndlr
With myAdxRtHist
.FlushData
.ErrorMode = EXCEPTION ' EXCEPTION, DialogBox, NO_EXCEPTION
.Source = "IDN"
.ItemName = [C7].Value
.Mode = [H8].Value
.RequestHistory ("DATE,CLOSE") 'NOTE USE OF OLD FIELD NAMES, NOT ("TRDPRC_1.TIMESTAMP,TRDPRC_1.CLOSE,TRDPRC_1.VOLUME")
'arrFlds = Array("DATE","CLOSE","VOLUME")
'.RequestHistory ()arrFlds
'.RequestHistory ("*") ' "*" requests all fields.
End With
Exit Sub
errHndlr:
[F13].Value = Err.Number & " " & Err.Description
End Sub