Page 1 of 1

TM1 Action Button's and VBA

Posted: Fri Oct 16, 2009 4:58 pm
by Kaveenga
Hi All

In Excel VBA, the TIButton object lists has having the following members. The DoRunTI member seems particularly useful. Has anyone directly access the TIButton object via VBA? If so would appreciate if you can share a snippet of code!

Many thanks

Kaveenga

--------------------------------------------------------------

AutoRecalc
AutoTitles
BackColor
Caption
ConfirmMessage
DisplayHyperlink
DoNavigate
DoRunTI
FailureMessage
Font
ForeColor
ImageName
IsMappingFormula
ParameterName
ParameterType
ParameterValue
ProcessImage
ProcessName
ProcessNameFormula
ProcessParamFormula
ReplaceWindow
ServerName
ShowConfirmMessage
ShowFailureMessage
ShowSuccessMessage
SourceObjects
SourceObjectsFormula
SourceTypes
SourceTypesFormula
SuccessMessage
TargetAliases
TargetAliasesFormula
TargetObjects
TargetObjectsFormula
TargetSubsets
TargetSubsetsFormula
TargetTypes
TargetTypesFormula
TargetValues
TargetValuesFormula
TargetWorkbookName
TargetWorksheetName
UseApporg
UseFormula
UseImage
Version

AboutBox
GetProcess
SavePictureToFile

Re: TM1 Action Button's and VBA

Posted: Fri Oct 16, 2009 8:06 pm
by Wim Gielis

Re: TM1 Action Button's and VBA

Posted: Mon Oct 19, 2009 12:05 pm
by garry cook
Not really played with Action Buttons but I guess what you're trying to do is run a process from VBA. Attached is a file that does this.

HTH

Re: TM1 Action Button's and VBA

Posted: Tue Oct 20, 2009 11:05 pm
by paulsimon
Hi

I don't think that there is any bug here. Cognos in their infinite wisdom have just decided not to expode the method that will allow you to run the TIButton programmatically.

The DoRunTI is a property rather than a method. It just returns true or false according to whether the TI Button is set up to run a TI or do a Worksheet jump.

There is no method to execute the TI.

Therefore I think the only way is to use the API calls. Wasn't the introduction of the Action Button supposed to get around that?

Regards


Paul Simon

Re: TM1 Action Button's and VBA

Posted: Mon Jul 26, 2010 1:31 pm
by AmbPin
Hello,

Not sure if this is what you were looking for but it may help:-

Dim sht As Worksheet
Dim tib As TM1XlCubeView_1_4.TIButton
Dim obj As Object

Set sht = ActiveWorkbook.Sheets(1)

For Each obj In sht.OLEObjects
If obj.progID = "TM1XL.TIButtonCtrl.1" Then
Set tib = sht.OLEObjects("TIButton1").Object
End If
Next

Re: TM1 Action Button's and VBA

Posted: Fri Jan 23, 2015 12:30 am
by yyi
Very useful code, thanks! :D

Was needing to change properties in a list of action buttons displayed as hyperlinks.

btw. an alternative to using progID's is Shape.Name
eg:
...
Dim vShape as Shape

For Each vShape In sht.Shapes
If Left(vShape.Name, 8) = "TIButton" Then
Set tib = sht.OLEObjects(vShape.Name).Object
tib.Caption = "blah"
End If
Next