View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Memphis Memphis is offline
external usenet poster
 
Posts: 32
Default Removind diagonal lines created on sheet

I have this code on a check box
Private Sub chkboxE4NA_Click()
ActiveSheet.Unprotect
'Draws a line accross both pages in Worksheet E4 and directs the user to
Worksheet E5
ActiveSheet.Shapes.AddLine(0#, 1.5, 543.75, 713.25).Select
Selection.ShapeRange.Line.Weight = 2.25
Selection.ShapeRange.Flip msoFlipHorizontal
ActiveSheet.Shapes.AddLine(546.75, 1.5, 1073.25, 714#).Select
Selection.ShapeRange.Line.Weight = 2.25
Selection.ShapeRange.Flip msoFlipHorizontal
'Checks the checkbox in page 2 to indicate this sheet also does N/A
chkE4NA1.Value = True
'this places the protection back on the worksheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlUnlockedCells
'This takes the user to E5 since worksheet E4 does not apply
Sheets("E5").Select
End Sub

I would like to add an option for the user to delete the diagonal lines
created.
I can't seem to come up with how to do this. If I uncheck the chkbox, it
adds a new line ontop of the one already there. I would like the unchecking
action to delete the lines.
This is to save the user time and to make things look neat when printing the
workbook. So adding these lines corssing out the sections is a nice
enhancement to my workbook.

Thank you