keldsor
Board Regular
- Joined
- Jun 9, 2017
- Messages
- 52
I have some named shapes on the active sheet - let's say then names are "28", "28+31" and "31".
They have got their names from some LONG PId's in my Access DB - never mind that !
"28" and "31" are in fact som ractangles and between them - a little lower on the sheet - is a triangle - this construction represents 2 persons (the rectangles) and the triangle shows they are merried !
I now want to connect a msoConnectorElbow with an msoArrowheadOpen from each person starting from the middle of the lower side of each rectangle to each side of the triangle.
I use this code taken from a recording of a macro, edited a little and copied to this sub :
I get run time error 438 Obj doesn't support this property or method in the marked line !!!!!!!!!!!!!!!!!!!!
What do I do wrong here ?
They have got their names from some LONG PId's in my Access DB - never mind that !
"28" and "31" are in fact som ractangles and between them - a little lower on the sheet - is a triangle - this construction represents 2 persons (the rectangles) and the triangle shows they are merried !
I now want to connect a msoConnectorElbow with an msoArrowheadOpen from each person starting from the middle of the lower side of each rectangle to each side of the triangle.
I use this code taken from a recording of a macro, edited a little and copied to this sub :
HTML:
Public Sub setArrowsOn(PId1 As Long, PId2 As Long)
ActiveSheet.Shapes(Trim(Str(PId1))).AddConnector(msoConnectorElbow, 100, 100, 100, 100).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen
Selection.ShapeRange.ConnectorFormat.BeginConnect ActiveSheet.Shapes(Trim(Str(PId1))), 3
Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.Shapes(PId1 & "+" & PId2), 2
End Sub
I get run time error 438 Obj doesn't support this property or method in the marked line !!!!!!!!!!!!!!!!!!!!
What do I do wrong here ?