Skip to Content
avatar image
Former Member

Log on to BPC/EPM using Excel VBA

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 24, 2017 at 08:27 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 24, 2017 at 07:48 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2017 at 04:11 PM

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

    Dim epm As New FPMXLClient.EPMAddInAutomation
    Add comment
    10|10000 characters needed characters exceeded