Bonjour,
Je reviens vers vous concernant un code que Banzai64 m'a crée, que je le remercie et le salut au passage
Private Sub TAjouter_Click()
'Déclarations des variables
Dim ligne As Long, n As Long
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
Me permet d'insérer des lignes dans ma facture,
Mon problème et qu''à partir du moment ou j'insère une ligne vide dans la dernière ligne du tableau (ligne 21 ou 39) j'ai des trait horizontal qui apparaît.
J'aimerais supprimer ces traits lorsque j'insère de nouvelle lignes, peu importe d'où je l'insère
Merci beaucoup
Voici mon fichier :