Hello,
I have following code which I want to use to add arrows at active cell location. Problem I am facing that at every incidence of use of this, the length of added arrow keeps increasing.
Please help to solve.
Sub InsertArrow()
ActiveSheet.Shapes.AddConnector(msoCnnectorStraight, ActiveCell.Left, ActiveCell.Top, 4, 4).Select
With Selection
With .ShapeRange.Line
.EndArrowheadStyle = msoArrowheadOpen
.Visible = msoTrue
.ForeColor.RGB = RGB(178, 0, 0)
.Transparency = 0
.Weight = 1.5
End With
End With
End Sub
I have following code which I want to use to add arrows at active cell location. Problem I am facing that at every incidence of use of this, the length of added arrow keeps increasing.
Please help to solve.
VBA Code:
ActiveSheet.Shapes.AddConnector(msoCnnectorStraight, ActiveCell.Left, ActiveCell.Top, 4, 4).Select
With Selection
With .ShapeRange.Line
.EndArrowheadStyle = msoArrowheadOpen
.Visible = msoTrue
.ForeColor.RGB = RGB(178, 0, 0)
.Transparency = 0
.Weight = 1.5
End With
End With
End Sub