Skip to Content
0

Macro for refreshing EPM report

Dec 21, 2017 at 08:47 PM

93

avatar image

Had a button in one of my EPM reports that used to refresh the EPM report, but it not longer works. Error is "Run-time error '9': Subscript out of range.

VBA is:

Sub REFRESH()

Dim api As Object
Set api = Application.COMAddIns("FPMXLClient.Connect").Object
api.RefreshActiveWorkBook
Application.Run "EPMExecuteAPI", "RefreshActiveWorkbook"

End Sub

Why would this no longer work?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin Dec 24, 2017 at 03:59 PM
0

Your issues are related to the migration to AO 2.4.

VBA code for AO is different then the code for standalone EPM.

Please read help:

https://help.sap.com/viewer/46f83019d80d4a0787baa7e49f3f95af/2.6.0.0/en-US/f9b3df686faf1014878bae8cb0e91070.html

Sample of VBA is here!

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

Dim api As Object
Set api = cofCom.GetPlugin("com.sap.epm.FPMXLClient")
Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Dec 21, 2017 at 08:51 PM
0

Strange code :)

Why:

api.RefreshActiveWorkBook
Application.Run "EPMExecuteAPI", "RefreshActiveWorkbook"

??

Please provide your EPM SP

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Can't say why for sure... because it worked! Unfortunately not anymore.

EPM version 2.4.3369599

Part of Analysis Office client 2.4

Thank you for your assistance.

0