Skip to Content
0

Log on to BPC/EPM using Excel VBA

Feb 24, 2017 at 05:39 AM

1.2k

avatar image

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.

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

3 Answers

Best Answer
Vadim Kalinin Feb 24, 2017 at 08:27 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Feb 24, 2017 at 07:48 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Paul Whittington Feb 24, 2017 at 04:11 PM
0

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

Dim epm As New FPMXLClient.EPMAddInAutomation
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please accept the correct answer and close the question!

0