Active Method
Returns the active object in the collection.
Syntax
object.Active
Applies To
Discussion
Use this method to gain control of the active object in a collection. For example, when you have multiple Graph objects in a report, use this method to identify the single active graph object in the collection of Graph objects.
Related Topics
Return Type
Object
Example
This example adds a stacked bar graph to the report and shows the graph type of the active graph.
Sub Main()
Dim objPPRep as Object
Set objPPRep = CreateObject("CognosPowerPlay.Report")
objPPRep.Open "C:\Cubes and Reports\Trend.ppx"
objPPRep.Graphs.Add 5
MsgBox "The active graph type is " _
&objPPRep.Graphs.Active.Type
objPPRep.Save
objPPRep.Close
Set objPPRep = Nothing
End Sub