DiagramNodeChildren Collection [Excel 2003 VBA Language Reference]

DiagramNode
DiagramNodeChildren
DiagramNode

A collection of DiagramNode objects that represents child nodes in a diagram.

Using the DiagramNodeChildren collection

Use the Children property of the DiagramNode object to return a DiagamNodeChildren collection. To add an individual child diagram node to the collection, use the AddNode method. To return individual child diagram nodes in the collection, use the FirstChild or LastChild properties, or the Item method.

This example deletes the first child of the second node in the first diagram in the worksheet. This example assumes that the first shape in the active worksheet is a diagram with at least two nodes, one with child nodes.

Sub DiagramNodeChild()
    ActiveSheet.Shapes(1).Diagram.Nodes.Item(2) _
        .Children.FirstChild.Delete
End Sub

Properties | Application Property | Count Property | Creator Property | FirstChild Property | LastChild Property | Parent Property

Methods | AddNode Method | Item Method | SelectAll Method

Parent Objects | DiagramNode Object

Child Objects | DiagramNode Object

See Also | DiagramNode Object | DiagramNode Property | DiagramNodes Collection