cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BPC 10.1 Classic on HANA EPM AO2.8

vinoogan
Explorer
0 Likes
569

Hi

In the below code SAPEXCEL ADDIN Object return as NOTHING getting Error NO 9 Subscript out of range. I check the COM Addin in EXCEL i unable to find

"SAP ADD IN for MICROSOFT Excel " was missing in my COM Addin" Do i need it in 2.8 EPM AO plugin ?

I tried to download it from .NET Frame work but it failed. Any suggestion how i can dowload COM Addin SAPExcel

Sub PageAxisOverride()

Dim cofCom As Object Dim epmCom As Object

Dim ARY() As String Dim i As Integer

Dim comm As String

Set cofCom = Application.COMAddIns("SapExcelAddIn").Object

cofCom.ActivatePlugin ("com.sap.epm.FPMXLClient")

Set epmCom = cofCom.GetPlugin("com.sap.epm.FPMXLClient")

End Sub

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Likes

Universal code:

    Dim objAddIn As COMAddIn
    Dim epm As Object
    Dim AOComAdd As Object
    Dim blnEPMInstalled As Boolean
    
On Error GoTo Err
    'Universal code to get FPMXLClient for standalone EPM or AO
    For Each objAddIn In Application.COMAddIns
        If objAddIn.progID = "FPMXLClient.Connect" Then
            On Error GoTo ErrConnect
            objAddIn.Connect = True
            On Error GoTo 0
            Set epm = objAddIn.Object
            blnEPMInstalled = True
            Exit For
        ElseIf objAddIn.progID = "SapExcelAddIn" Then
            Set AOComAdd = objAddIn.Object
            Set epm = AOComAdd.GetPlugin("com.sap.epm.FPMXLClient")
            blnEPMInstalled = True
            Exit For
        End If
    Next objAddIn
    
    If Not blnEPMInstalled Then
        MsgBox "EPM is not installed!"
    End If
    
    'Your code here

    Exit Sub
    
ErrConnect:
    If Err.Number = -2147467259 Then
        Resume Next
    End If
vinoogan
Explorer
0 Likes

Fixed issue declaration need to be changed in EPM AO2.8 it needs to be Application.COMAddIns("FPMXLClient.Connect").Object also ensure VBA Reference include FPMXL

Sub PageAxisOverride()

Dim cofCom As Object Dim epmCom As Object

Dim ARY() As String Dim i As Integer Dim comm As String

Set epmCom = Application.COMAddIns("FPMXLClient.Connect").Object

epmCom.RefreshActiveSheet

End Sub

Thanks

Vinoo