cancel
Showing results for 
Search instead for 
Did you mean: 

VBA that can be utilized when using the AO 2.3.2 Analysis standalone and the EPM Standalone

Former Member
0 Kudos

BPC Gurus,

When AO came out the whole design was to get away from the EPM standalone version as it was embedded via AO. That has not tested well for us just to complete the full install so we have gone a different route.

We are utilizing the EPM Standalone and the Analysis Standalone (From AO 2.3.2).

As discussed in many threads and documentation the VBA is different.

Some of our user base will have EPM only and some will have both.

Struggling between a nested If statement or separate templates based on what's installed to call the VBA.

Any suggestions?

Dim api As Object
Dim cofCom As Object

On Error Resume Next

Set cofCom = Application.COMAddIns("SapExcelAddIn").Object
On Error GoTo 0


If cofCom Is Nothing Then
Set api = Application.COMAddIns("FPMXLClient.Connect").Object
Else
Set api = cofCom.GetPlugin("com.sap.epm.FPMXLClient")
End If

View Entire Topic
jrg_finster3
Active Participant
0 Kudos
Option Explicit
Global myFPM As Object 
Function AFTER_WORKBOOK_OPEN() 'BPC Event
     Set myFPM = GetAPI()
End Function
Public Function GetAPI() As Object
    Dim myFPM As Object
    Dim cofCom As Object
    On Error Resume Next
    Set cofCom = Application.COMAddIns("SapExcelAddIn").Object
    
    If Err.Number > 0 Then
        Set myFPM = CreateObject("FPMXLClient.EPMAddInAutomation")
    Else
        Set myFPM = cofCom.GetPlugin("com.sap.epm.FPMXLClient")
    End If
    Set GetAPI = myFPM
End Function
jrg_finster3
Active Participant

Sorry, here is the text. I am to stupid to understand the formatting in this new SCN.

This Code helped us, we also had a mixture of installations (and we also cant just install a new Version when ever we want)

Regards Jörg