cancel
Showing results for 
Search instead for 
Did you mean: 

Set macro SetActiveConnection

0 Kudos

Hi Experts ,

I am trying to use macros to change the workbook connection to model via vba.

I need to use "setactiveconnection" but i don't know the arguments of this function.

Any idea of how to use it on BPC 10 NW?

Thank you in advance

Rosanna

Accepted Solutions (1)

Accepted Solutions (1)

lucas_costa3
Active Contributor
0 Kudos

Hi Rosanna,

First of all you need to "build" your connection link, for that update the values in bold.

_FPM_BPCNW10_[{your_server}:9014/sap/bpc/]_[{environment}]_[{model}]_[false]

Tip: To get the values you can use epm formulas and concatenate them:

A1Fixed_FPM_BPCNW10_[
A2Formula=EPMServer()
A3Fixed]_[
A4Formula=EPMEnvDatabaseID()
A5Fixed]_[
A6FixedFINANCIALS
A7Fixed]_[false]

For the change connection basically use:

Sub test1()

   

    Dim EPM As New FPMXLClient.EPMAddInAutomation

   

    EPM.SetActiveConnection Sheet1, Range("A8").Value

   

End Sub

A8 is the cell with concatenated values.

Lucas

0 Kudos

Thanks a lot!

Answers (0)