Reverse Property

Microsoft PowerPoint Visual Basic

constant that represents a diagram's reverse state. Read/write.

MsoTriState can be one of these MsoTriState constants.
msoCTrue Doesn't apply to this property.
msoFalse The diagram is not reversed.
msoTriStateMixed Doesn't apply to this property.
msoTriStateToggle Doesn't apply to this property.
msoTrue The diagram is reversed.

expression.Reverse

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

This method generates an error if the value of the target diagram's Type property is an organization chart (msoDiagramTypeOrgChart).

Example

The following example creates a pyramid diagram, and reverses its coloring.

Sub ReversePyramidDiagram()

    Dim dgnNode As DiagramNode
    Dim shpDiagram As Shape
    Dim intNodes As Integer

    'Adds a pyramid diagram and first child node
    Set shpDiagram = ActivePresentation.Slides(1).Shapes.AddDiagram _
        (Type:=msoDiagramPyramid, Left:=10, Top:=15, _
        Width:=400, Height:=475)
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode

    'Adds three additional nodes to diagram
    For intNodes = 1 To 3
        dgnNode.AddNode
    Next intNodes

    'Automatically places nodes, and reverses node order
    With dgnNode.Diagram
        .AutoLayout = msoTrue
        .Reverse = msoTrue
    End With

End Sub