Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.57 KB

Excel.ConnectorFormat.EndConnectionSite.md

File metadata and controls

55 lines (37 loc) · 1.57 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ConnectorFormat.EndConnectionSite property (Excel)
vbaxl10.chm646082
vbaxl10.chm646082
Excel.ConnectorFormat.EndConnectionSite
5791efdb-5cea-739c-b117-0858d8d45f08
04/23/2019
medium

ConnectorFormat.EndConnectionSite property (Excel)

Returns an integer that specifies the connection site that the end of a connector is connected to. Read-only Long.

Syntax

expression.EndConnectionSite

expression A variable that represents a ConnectorFormat object.

Remarks

If the end of the specified connector isn't attached to a shape, this property generates an error.

Example

This example assumes that myDocument already contains two shapes attached by a connector named Conn1To2. The code adds a rectangle and a connector to myDocument. The end of the new connector will be attached to the same connection site as the end of the connector named Conn1To2, and the beginning of the new connector will be attached to connection site one on the new rectangle.

Set myDocument = Worksheets(1) 
With myDocument.Shapes 
 Set r3 = .AddShape(msoShapeRectangle, _ 
 100, 420, 200, 100) 
 With .Item("Conn1To2").ConnectorFormat 
 endConnSite1 = .EndConnectionSite 
 Set endConnShape1 = .EndConnectedShape 
 End With 
 With .AddConnector(msoConnectorCurve, _ 
 0, 0, 10, 10).ConnectorFormat 
 .BeginConnect r3, 1 
 .EndConnect endConnShape1, endConnSite1 
 End With 
End With

[!includeSupport and feedback]