ActiveSheet.PageSetup.PrintArea = "$A$1:$M$" & Range("I65536").end(xlup).row
Sub impression() 'Print the page through a Print button
Dim MyValue As Byte
MyValue = MsgBox("Voulez-vous imprimer ?", vbYesNo + vbDefaultButton1)
If MyValue = vbNo Then Exit Sub
With ActiveSheet
.PageSetup.PrintArea = "$A$1:$M$"& Range("I65536").end(xlup).row
With .PageSetup
.PaperSize = xlPaperA4
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = 1
.BlackAndWhite = True
End With
.PrintOut Copies:=1
End With
[COLOR=#0000ff].Range("i" & Drlng + 1).FormulaLocal = "=I" & Drlng & "-H" & Drlng[/COLOR]
est-ce +clair ?
[COLOR=#0000ff].Range("i" & Drlng & ":h" & Drlng).Formula = "=SUM(I2:I" & Drlng-1 & ")"[/COLOR]
[COLOR=#0000ff].Range("h" & Drlng & ":j" & Drlng).Formula = "=SUM(H2:H" & Drlng-1 & ")"[/COLOR]