Skip to Content
avatar image
Former Member

"Automation error" when run VBA EPM RunPackage

Could someone help to fix my error in VBA.

I try to execute this code and got the error "automation error"....Thanks

=============================================

Sub test()

Dim pkge As New FPMXLClient.ADMPackage

Dim EPM As New FPMXLClient.EPMAddInDMAutomation

With pkge

.GroupId = "Data Management"

.TeamId = "BPC_CC"

.Filename = "/CPMB/CLEAR"

.PackageId = "Clear"

.PackageType = "Process Chain"

.PackageDesc = ""

.UserGroup = ""

End With

EPM.RunPackage pkge, "C:\Temp\DMUserSelection4.xml"

End Sub

===================================================

Here's my XML file

======

Clear{param_separator} http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">

<_ap>

<Name>%SELECTION%</Name>

<Values />

</_ap>

<_apc>

<StringListPair> <str>CATEGORY</str> <lst> <string>ACTUAL_FMO</string> </lst> </StringListPair>

</_apc>

</AnswerPromptPersistingFormat>

</ArrayOfAnswerPromptPersistingFormat>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Aug 04, 2017 at 07:55 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 04, 2017 at 08:39 PM

    Yes I saw your blog. This is from where I started but I still have this "Automation Error". I wrote my code and built the XML file based on your blog. But maybe I mist something. You can see my code and XML above.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 06, 2017 at 12:02 PM

    Using the code from my blog you have to:

    Public Sub TestRunDM()
        Dim strAnsw() As String
        ' Sample to run Clear DM package    
        ReDim strAnsw(0 To 3)
        strAnsw(0) = "%SELECTION%P|DIMENSION:CATEGORY|ACTUAL_FMO"
        strAnsw(1) = "%SELECTION_KEYDATE%V-1"
        strAnsw(2) = "%ENABLETASK%V1"
        strAnsw(3) = "%CHECKLCK%V0"
        ExeceuteDM strAnsw, "BPC_CC", "Data Management", "Clear", "/CPMB/CLEAR", "0001"
    End Sub
    Add comment
    10|10000 characters needed characters exceeded