S
sedky
Hi,
I am trying to create an organization chart programmatically in excel.
I got this code from a previous posting, but adding text doesn't work.
I also need to link the boxes together. Can someone please post some
code on how to do that?
Thanks
Dim shDiagram as Shape
Dim nodRoot As DiagramNode
Set shDiagram = ActiveSheet.Shapes.AddDiagram( _
Type:=msoDiagramOrgChart, Top:=10, _
Left:=15, Width:=400, Height:=475)
Set nodRoot = shDiagram.DiagramNode.Children.AddNode
nodRoot.TextShape.TextFrame.Characters.Text = "First Node"
I am trying to create an organization chart programmatically in excel.
I got this code from a previous posting, but adding text doesn't work.
I also need to link the boxes together. Can someone please post some
code on how to do that?
Thanks
Dim shDiagram as Shape
Dim nodRoot As DiagramNode
Set shDiagram = ActiveSheet.Shapes.AddDiagram( _
Type:=msoDiagramOrgChart, Top:=10, _
Left:=15, Width:=400, Height:=475)
Set nodRoot = shDiagram.DiagramNode.Children.AddNode
nodRoot.TextShape.TextFrame.Characters.Text = "First Node"