MacroName Property

Sets or returns the name of the macro associated with an Exception object.

Syntax

Exception.MacroName

Applies To

Exception Object

Discussion

To define the initial value of this property, use the SetMacro method. This avoids defining a MacroName without associating a style with it.

Type

String

Access

Read/Write

Example

This example determines the name of the macro associated with an Exception object.

Sub Main()
   Dim objPPRep as Object
   Set objPPRep = CreateObject("CognosPowerPlay.Report")
   objPPRep.Open "C:\Cubes and Reports\Exception.ppx"
   MsgBox "Driving Category:" & _ 
      objPPRep.Exceptions.Item(1).DrivingCategory
   MsgBox "Driving Dimension:" & _ 
      objPPRep.Exceptions.Item(1).DrivingDimension
   MsgBox "The name of the macro associated with the
" & _
      "Exception is " &objPPRep.Exceptions.Item(1).MacroName
   MsgBox "The style of the macro associated with the
" & _
      "Exception is " &objPPRep.Exceptions.Item(1).MacroStyle
   Set objPPRep = Nothing
End Sub

Related Topics