1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Private Sub CommandButton12_Click()
ActiveSheet.Shapes.AddLine(234.75, 107.25, 403.5, 107.25).Select
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Line.ForeColor.SchemeColor = 12
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.Weight = 2.5
Selection.ShapeRange.Line.Style = msoLineSingle
' Selection.ShapeRange.Line.DashStyle = msoLineDash 'Trait en pointillé
Selection.ShapeRange.Line.DashStyle = msoLineSolid 'Trait plein
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.SetShapesDefaultProperties
' Selection.Delete
Selection.ShapeRange.Line.Visible = msoFalse
Dim cmd_bar As CommandBar, cmd_control As CommandBarButton
Set cmd_bar = Application.CommandBars("Lines")
For Each cmd_control In cmd_bar.Controls
If cmd_control.ID = 200 Then
cmd_control.Execute
Exit For
End If
Next
End Sub |
Partager