Remove (Shape) Straight Line [Solved/Closed]

Report
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Hello
I would like to request how to remove straight line shape through vba

It was made through the following vba code

Sub Str_line()
ActiveSheet.Shapes.AddLine(259, 169#, 341, 169).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadNone
Selection.ShapeRange.Line.Weight = 1#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.ForeColor.SchemeColor = 0
End Sub


Thanks & Regards

1 reply

Name the Line:
Selection.ShapeRange.Name = "smuneeb line"

to delete:
ActiveSheet.Shapes("smuneeb line").Delete
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1
Hi
Awesome Great Job
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1
Hi
Its a request to related query is that, is shows an error if any cell is selected
Please solve this issue either it selected the shape or not.
Thanks

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!