perola.rike
Board Regular
- Joined
- Nov 10, 2011
- Messages
- 151
I wish to programatically to add a connector in the center of the cells in range B5:B11. I do have the following code below, but how to place the connector in the center (not left)?
Sub AddArrow()
Dim shp As Shape
Set shp = ActiveSheet.Shapes.AddConnector(msoConnectorStraight, Range("B1").Left, Range("B5").Top, Range("B11").Left, Range("B11").Top)
shp.Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen
End Sub
Sub AddArrow()
Dim shp As Shape
Set shp = ActiveSheet.Shapes.AddConnector(msoConnectorStraight, Range("B1").Left, Range("B5").Top, Range("B11").Left, Range("B11").Top)
shp.Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen
End Sub