cancel
Showing results for 
Search instead for 
Did you mean: 

EPM Log on Error using VBA

former_member841507
Discoverer
0 Kudos

Hi everyone,
I want to write a macro for logging on to Excel EPM module. My code is:

Dim epm As Object
Dim strConn As String
Public Sub GetCon()
Set epm = CreateObject("FPMXLClient.EPMAddInAutomation")
strConn = "X" (I cannot share this part since the company's privacy.)
epm.Connect strConn, str
End Sub

This code works if I had logged on earlier manually and then log out. Yet, it is not working when I opened the Excel and directly ran the macro. The error as follows


What could be the reason? What should I do to fix my macro?

View Entire Topic
former_member186338
Active Contributor
0 Kudos

You need to properly initialize epm object!

Please look on my sample code: https://blogs.sap.com/2019/06/24/bpc-nw-10-vba-function-to-get-bassomeparent-dimension-members-list/