ExecuteProcess in VBA

Post Reply
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

ExecuteProcess in VBA

Post by appleglaze28 »

Hi I was able to dig through some codes for executing processes in VBA...even though I don't get any error...is there anyway that you can help me troubleshoot the codes to get them working?

Code: Select all

Sub Representation_Warning()
Dim Representation_Remark As Range

If Range("Representation_Remark").Text = "Beyond Allowable Expense" Then
'MESSAGE BOX
 Select Case MsgBox("The Representation Expense is Beyond its allowed expense limit. Would you like to approve this expense?", vbExclamation + vbYesNo, "Representation Expense Warning !")
    Case vbYes
    Select Case MsgBox("Are you sure you would like to approve this Representation Expense", vbQuestion + vbYesNo, "Representation Expense Approval ?")
    Case vbYes
    vbaTm1ExecuteProcess "Apps", "APPROVE_representation", 4, Sheet2.Range("C2"), Sheet2.Range("C3"), Sheet2.Range("C4"), Sheet2.Range("C5")
    MsgBox ("You have approved the Representation Expense Budget")
    Case vbNo
    End Select
    Case vbNo
    MsgBox ("Kindly have the Sales Personnel responsible to adjust the expense")
    End Select
End If

End Sub
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: ExecuteProcess in VBA

Post by Martin Ryan »

If you're having trouble running a process then it's not with this section of code, it's the "vbaTm1ExecuteProcess" function. You'll need to work your way through that function and get it to return the data that you need.

Alternatively there's some semi-supported code for running a TI process, including some error handling, here: http://forums.olapforums.com/viewtopic. ... 410#p15379 (I say semi supported because it's developed and used by people from the forum so a few people know what it does fairly well).

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Post Reply