Stan Naplas
New Member
- Joined
- Sep 5, 2012
- Messages
- 4
For an application I need to draw a double bended arrow. I draw it by fitting two parts: an “msoShapeBlockArc” and an “msoShapeBentArrow”.
However when I print it the two parts don’t fit correctly! Any suggestion how this may be corrected?
The function below is called as “=DoubleBendArrow(a1:a5)”. Values in (a1:a5) may be p.e. (100,100,600,700,100)
Function DoubleBendArrow(r)
' r= (Left, Top, Width, Height, ArrowWidth)
cc = r(3) - r(5)
If cc > (r(4) - 2 * r(5)) Then cc = r(4) - 2 * r(5)
Set myDocument = ActiveSheet
With myDocument.Shapes.AddShape(msoShapeBlockArc, r(1), r(2), r(5) * 4, r(5) * 4)
.Adjustments(1) = -90
.Adjustments(2) = 0
.Adjustments(3) = 0.25
.Visible = True
End With
With myDocument.Shapes.AddShape(msoShapeBentArrow, r(1) + 3 * r(5), r(2) + 2 * r(5), r(3) - r(5), r(4) - 2 * r(5))
.Adjustments(1) = r(5) / cc
.Adjustments(2) = r(5) / cc / 2
.Adjustments(3) = r(5) / cc / 2
.Adjustments(4) = r(5) / cc * 2
.Flip FlipCmd:=msoFlipVertical
.Visible = True
End With
DoubleBendArrow = 0
End Function
However when I print it the two parts don’t fit correctly! Any suggestion how this may be corrected?
The function below is called as “=DoubleBendArrow(a1:a5)”. Values in (a1:a5) may be p.e. (100,100,600,700,100)
Function DoubleBendArrow(r)
' r= (Left, Top, Width, Height, ArrowWidth)
cc = r(3) - r(5)
If cc > (r(4) - 2 * r(5)) Then cc = r(4) - 2 * r(5)
Set myDocument = ActiveSheet
With myDocument.Shapes.AddShape(msoShapeBlockArc, r(1), r(2), r(5) * 4, r(5) * 4)
.Adjustments(1) = -90
.Adjustments(2) = 0
.Adjustments(3) = 0.25
.Visible = True
End With
With myDocument.Shapes.AddShape(msoShapeBentArrow, r(1) + 3 * r(5), r(2) + 2 * r(5), r(3) - r(5), r(4) - 2 * r(5))
.Adjustments(1) = r(5) / cc
.Adjustments(2) = r(5) / cc / 2
.Adjustments(3) = r(5) / cc / 2
.Adjustments(4) = r(5) / cc * 2
.Flip FlipCmd:=msoFlipVertical
.Visible = True
End With
DoubleBendArrow = 0
End Function