on ‎2021 Sep 14 1:37 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.