Shapes.AddConnector (Excel)

Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it's not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.

When you attach a connector to a shape, the size and position of the connector are automatically adjusted, if necessary. Therefore, if you are going to attach a connector to other shapes, the position and dimensions that you specify when adding the connector are irrelevant.

AddConnector (Type, BeginX, BeginY, EndX, EndY)


Dim shpAddConnector As Shape
Set shpAddConnector = ActiveChart.Shapes.AddConnector(Type:=msoConnectorTypeMixed, BeginX:=, BeginY:=, EndX:=, EndY:=)

Arguments

The following arguments are required:

Type (Office.MsoConnectorType) - The connector type to add.

BeginX (Single) - The horizontal position (in points) of the connector's starting point relative to the upper-left corner of the document.

BeginY (Single) - The vertical position (in points) of the connector's starting point relative to the upper-left corner of the document.

EndX (Single) - The horizontal position (in points) of the connector's end point relative to the upper-left corner of the document.

EndY (Single) - The vertical position (in points) of the connector's end point relative to the upper-left corner of the document.