Hi, anyone familiar with execution error: DfaddPeriod method of "AdxDateModule" object failed? Thank

Error is after upgrading to eikon 4.0.57. Still works on 4.0.53.
execution error: DfaddPeriod method of "AdxDateModule" object failed

Anyone familiar with this error? Thanks!

Best Answer

  • @mhon.cinco

    Sorry for the issue you are facing, let me see if I can help you in resolving this.

    The version of my Eikon is 4.0.59. and I can run the code below properly.

    Dim m_AdxDateModule As AdfinXAnalyticsFunctions.AdxDateModule
    Private Declare PtrSafe Function CreateReutersObject Lib "PLVbaApis.dll" (ByVal progID As String) As Object
     
    Sub Test()
        Dim res As Variant
        If m_AdxDateModule Is Nothing Then Set m_AdxDateModule = CreateReutersObject("AdfinXAnalyticsFunctions.AdxDateModule")
        res = m_AdxDateModule.DfAddPeriod("FRA", "12/02/2021", "1M", "EMC:S")
        Debug.Print res(1, 1) & ", " & res(1, 2)
    End Sub

    I used the following steps:

    1. Create a new Excel file

    2. Open Visual Basic in Excel

    3. Import the PLVbaApis.bas file from the Eikon\Y\Bin (x64) folder

    4. Add the AdXfo.dll from the Eikon\Y\Bin (x64) folder as references

    5. Run the code

    1663900000730.png

    I hope this will help. If not, please share the code that you are using.