Hi,
I'm trying to get Corporate Action Data for a company. Everything works as expected until I pass edate/sdate parameters:
.InstrumentIDList = "NORR.OL"
.FieldList = "TR.CAAdjustmentFactor(CAEventType=SCN:SSP:SRE:CRD)"
.RequestParam = "SDate=04/27/2020"
No Error is returned, instead the returned array is an scaler of value NULL
When I leave the Request Parameters empty, I get a scaler value of 100, which is expected.
The corresponding EIKON Excel Formula works when parameters are set.
Function TR(RICs As Variant, Fields As Variant, Params As Variant) Dim strInstrList As String Dim ErrorArray(0, 0) As Variant Dim DataStatus As Dex2Lib.DEX2_DataStatus Application.EnableEvents = True 'Refer to Error Handler On Error GoTo errHandler ErrorArray(0, 0) = " - " 'Tidy Up If Not MyDex2Cookie = 0 Then MyDex2Mgr.Finalize (MyDex2Cookie) MyDex2Cookie = 0 Set MyDex2Mgr = Nothing Set MyDex2RData = Nothing End If ' Create the Dex2 and IDex2 objects. Set MyDex2Mgr = CreateDex2Mgr() Set MyDex2MgrADC = MyDex2Mgr ' Initialise using the DE_MC_ADC_POWERLINK enumeration MyDex2Cookie = MyDex2MgrADC.Initialize(DE_MC_ADC_POWERLINK) ' And create an RData object. Set MyDex2TR = MyDex2Mgr.CreateRData(MyDex2Cookie) ' Make a TR Request Async_UPDT_RCVD = False 'Set recent update to false With MyDex2TR .InstrumentIDList = RICs .FieldList = Fields .RequestParam = Params .Subscribe False End With ' For the With myDex2RData Dim StopTime As Date StopTime = Now() + (1 / 24 / 60 / 60 * 30) Do Until Async_UPDT_RCVD = True Or Now() >= StopTime DoEvents Loop TR = MyDex2TR.Data Exit Function