Howdy.
I have a worksheet that has a toolbar that allows the user to create a drawing line onto the worksheet. the code for a 2-inch line via the recorder is:
ActiveSheet.Shapes.AddLine(132, 272, 198.75, 272).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 2#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 62
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Line.BeginArrowheadLength = msoArrowheadLengthMedium
Selection.ShapeRange.Line.BeginArrowheadWidth = msoArrowheadWidthMedium
Selection.ShapeRange.Line.BeginArrowheadStyle = msoArrowheadDiamond
Selection.ShapeRange.Line.EndArrowheadLength = msoArrowheadLengthMedium
Selection.ShapeRange.Line.EndArrowheadWidth = msoArrowheadWidthMedium
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadDiamond
Selection.ShapeRange.ZOrder msoSendToBack
I have two things I am trying to get code for:
1. If the user selects the line and modifies it, if they don't hold the "shift" key while extending the line the line goes crooked. Any code to keep the line straight without holding the shift key?
2. I have the following code protecting this sheet:
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True
ActiveSheet.EnableSelection = xlNoRestrictions
How do I password protect the sheet while maintaining the DrawingObjects:=False?
Thanks in advance as usual.
Louis
I have a worksheet that has a toolbar that allows the user to create a drawing line onto the worksheet. the code for a 2-inch line via the recorder is:
ActiveSheet.Shapes.AddLine(132, 272, 198.75, 272).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 2#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 62
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Line.BeginArrowheadLength = msoArrowheadLengthMedium
Selection.ShapeRange.Line.BeginArrowheadWidth = msoArrowheadWidthMedium
Selection.ShapeRange.Line.BeginArrowheadStyle = msoArrowheadDiamond
Selection.ShapeRange.Line.EndArrowheadLength = msoArrowheadLengthMedium
Selection.ShapeRange.Line.EndArrowheadWidth = msoArrowheadWidthMedium
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadDiamond
Selection.ShapeRange.ZOrder msoSendToBack
I have two things I am trying to get code for:
1. If the user selects the line and modifies it, if they don't hold the "shift" key while extending the line the line goes crooked. Any code to keep the line straight without holding the shift key?
2. I have the following code protecting this sheet:
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True
ActiveSheet.EnableSelection = xlNoRestrictions
How do I password protect the sheet while maintaining the DrawingObjects:=False?
Thanks in advance as usual.
Louis