cancel
Showing results for 
Search instead for 
Did you mean: 

Log on to BPC/EPM using Excel VBA

Former Member
0 Kudos

I am trying to log on to BPC using VBA in Excel. I found a post on this website that gives code that should work, but I get the error 'Run-time error 424: Object required'. I may be omitting a reference, but if so, I don't know which one.


The line of code that causes a problem is:
client.Connect "BPC Planning Prod", MyUserName, MyPassWord

Any help would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor

To understand the connection string format - look on the current connection string:

Dim epm As New FPMXLClient.EPMAddInAutomation

Public Sub GetCon()
MsgBox epm.GetActiveConnection(ThisWorkbook.ActiveSheet)
End Sub

The code will be something like (not sure about _FPM_BPCMS10 - please check in prev step):

Dim epm As New FPMXLClient.EPMAddInAutomation
...
strConn = "_FPM_BPCMS10_[http://" & strServer & "]_[" & strEnvironment & _
            "]_[" & strModel & "]"
epm.Connect strConn, strUser, strPassword

Assuming:

strServer - server URL like 10.0.10.31:8080/sap/bpc/

strEnvironment - environment name

strModel - model name

strUser - user name

strPassword - password

Answers (2)

Answers (2)

former_member186338
Active Contributor

Full code please! And by the way, the VBA method to connect to bpc is described in epm help - API section.

0 Kudos

I tried to find this vba method described in EPM wiki but failed completely. Could you post the link please? BR.

former_member186338
Active Contributor
0 Kudos

Please, write a new question and explain what do you want to achieve!

0 Kudos

My question was fully answered on this ticket. I just failed to find this information like you explained above, which I would be interested in studying. Thank you.

former_member186338
Active Contributor
0 Kudos

Have you read standard EPM help? API section?

Former Member
0 Kudos

I was missing the code below. Thanks again, Vadim. Works great now.

Dim epm As New FPMXLClient.EPMAddInAutomation
former_member186338
Active Contributor
0 Kudos

Please accept the correct answer and close the question!