ConnectorFormat.EndConnectionSite 属性 (Excel)

返回用于指定连接符末端所连接的连接结点的整数。 只读 Long

语法

表达式EndConnectionSite

表达 一个代表 ConnectorFormat 对象的变量。

备注

如果指定连接符末端没有连接任何形状,该属性会产生错误。

示例

此示例假定 myDocument 已包含由名为 Conn1To2 的连接符附加的两个形状。 本示例的代码将向 myDocument 添加一个矩形和一个连接符。 新连接符终点的连接位置与原来名为 Conn1To2 的连接符终点的连接位置相同,而新连接符的起点会连接到新矩形的第一个连接位置上。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。