VBA/Excel yet again boggles my brain and leaves me screaming at my monitor...
I have written a macro that draws lines on a spreadsheet like so:
ActiveSheet.Shapes.AddLine(20, 35, 20, 50).Select
Selection.ShapeRange.Line.Weight = 2.25
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.Style = msoLineSingle
Now I would also like the macro to be able to delete this line at any given time too. However, the only information the macro will have is the co-ordinates of the line (ie. for above, 20, 35, 20, 50). The macro will not know the 'line number'.
I have tried out various ideas but cannot accomplish what I want. Does anyone know how to do this?
Any tips would save me a lot of stress!