constant which determines the automatic positioning of the nodes and connectors in a diagram. Read/write.
MsoTriState can be one of these MsoTriState constants. |
msoCTrue Does not apply to this property. |
msoFalse Disables automatic formatting for the diagram. |
msoTriStateMixed Does not apply to this property. |
msoTriStateToggle Does not apply to this property. |
msoTrue Enables automatic formatting for the diagram. |
expression.AutoLayout
expression Required. An expression that returns one of the objects in the Applies To list.
Example
This example creates a diagram in the current document and automatically positions the nodes and connectors.
Sub CreatePyramidDiagram()
Dim dgnNode As DiagramNode
Dim shpDiagram As Shape
Dim intCount As Integer
Set shpDiagram = ActiveSheet.Shapes.AddDiagram( _
Type:=msoDiagramPyramid, _
Left:=10, _
Top:=15, _
Width:=400, _
Height:=475)
Set dgnNode = shpDiagram.DiagramNode.Children.AddNode
For intCount = 1 To 3
dgnNode.AddNode
Next intCount
With dgnNode.Diagram
.AutoLayout = msoTrue
.Convert Type:=msoDiagramRadial
End With
End Sub