Private Sub TAjouter_Click()
ActiveSheet.Unprotect
ligne = Selection.Row
Application.ScreenUpdating = False
For n = 1 To CInt(NombreLigne.Value)
Selection.Offset(1, 0).EntireRow.Insert Shift:=xlShiftDown
Range("A" & ligne & ":I" & ligne).Copy
Rows(ligne + 1).RowHeight = 15
Range("A" & ligne + 1).PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("G" & ligne).Copy Destination:=Range("G" & ligne + 1)
Range("I" & ligne).Copy Destination:=Range("I" & ligne + 1)
ligne = ligne + 1
Next
Range("TotalH.T.").FormulaR1C1 = "=SUM(R21C:R[-1]C)"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, _
AllowFormattingCells:=True, AllowFormattingRows:=True
Unload Me
End Sub
Private Sub TSupprimer_Click()
ActiveSheet.Unprotect
Selection.EntireRow.Delete
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, _
AllowFormattingCells:=True, AllowFormattingRows:=True
Me.Hide
End Sub