cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

VBA Macro Calling DMP in different model

nicky_hays
Participant
0 Kudos
214

Hi,

I am on BPC 10.1 on SQL Server DB. I have a Excel worksheet which represents data in Model "A". Now in that worksheet, I have a button which executes a Data manager package (DMP) in Model B.

The VBA code for executing the DMP "COPY_BUDGET" is as follows. How can I specify the Model Name "B" in the connection parameter? When I am connected to Model A, I always get the error "Package Not Found". I have to manually change the model connection every time to execute the DMP through VBA macro. Is there a way to call/connect to  the model via the VBA macro code?

Option Explicit

Dim client As New EPMAddInAutomation

Sub B_Copy()

client.DataManagerRunPackage "COPY_BUDGET", "Data Management", ""

End Sub

Sincerely,

Nicky

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

First you have API's to work with connections: Connect, ChangeReportConnection and useful in your case SetActiveDataManagerConnection

But what package you are talking about? COPY_BUDGET - is it a standard copy or script logic?