返回一个 DiagramNodeChildren 对象,该对象代表特定节点的子节点集合。
expression.Children
expression 必需。该表达式返回“应用于”列表中的对象之一。
下例创建一个图表,并向该图表添加子节点。
Sub CreatePyramidDiagram()
    Dim dgnNode As DiagramNode
    Dim shpDiagram As Shape
    Dim intCount As Integer
    'Add pyramid diagram to current document
    Set shpDiagram = ActiveSheet.Shapes.AddDiagram( _
        Type:=msoDiagramPyramid, Left:=10, _
        Top:=15, Width:=400, Height:=475)
    'Add first child diagram node
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode
    'Add three more nodes
    For intCount = 1 To 3
        dgnNode.AddNode
    Next intCount
End Sub