I can code a shape to be drawn witha name.
Set sh = ActiveSheet.Shapes.AddShape(1, 120, 60, 45, 25)
sh.Name = "two"
and I can give it a name from a cell.
Text = Cells(1, 1)
Set sh = ActiveSheet.Shapes.AddShape(1, 60, 60, 45, 25)
sh.Name = Text
what I want to do is draw connectors between my named shapes.
This works:
ActiveSheet.Shapes.AddConnector(msoConnectorStraight, 216#,
151.5, 41.25, _
3.75).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadTriangle
Selection.ShapeRange.Flip msoFlipHorizontal
Selection.ShapeRange.Flip msoFlipVertical
Selection.ShapeRange.ConnectorFormat.BeginConnect
ActiveSheet.Shapes("two"), 4
Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.Shapes
("three"), 2
This won't!
ActiveSheet.Shapes.AddConnector(msoConnectorStraight, 216#, 151.5,
41.25, _
3.75).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadTriangle
Selection.ShapeRange.Flip msoFlipHorizontal
Selection.ShapeRange.Flip msoFlipVertical
Selection.ShapeRange.ConnectorFormat.BeginConnect
ActiveSheet.Shapes(Text), 4
Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.Shapes
("two"), 2
So how can I draw lines between shapes named with a variable???