Bonjour i20100,
Merci pour cette Macro qui fonctionne parfaitement.
J'ai ajouté d'autres arguments pour personnaliser un peu plus l'impression.
Peux-tu me donner ton avis ?
Bonne journée.
François
'****************************************
'IMPRIMER 3 PAGES DEPUIS LA PAGE ACCUEIL
'****************************************
Sub ButtonPrintStats()
With Sheets("Stats population").PageSetup
.PrintArea = "C4:M26" 'Zone d'impression
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
With Sheets("Stats métiers").PageSetup
.PrintArea = "D5:N27" 'Zone d'impression
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
With Sheets("Stats générales").PageSetup
.PrintArea = "E6:O28" 'Zone d'impression
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
With Sheets("Stats population").PageSetup
.LeftMargin = Application.InchesToPoints(0.8) 'Marge gauche
.RightMargin = Application.InchesToPoints(0.1) 'Marge droite
.TopMargin = Application.InchesToPoints(0.8) 'Marge haut de page ou top
.BottomMargin = Application.InchesToPoints(0.8) 'Marge bas de page si nécessaire
.Orientation = xlLandscape 'Paysage
'.Orientation = xlPortrait 'Portrait
End With
With Sheets("Stats métiers").PageSetup
.LeftMargin = Application.InchesToPoints(0.8) 'Marge gauche
.RightMargin = Application.InchesToPoints(0.1) 'Marge droite
.TopMargin = Application.InchesToPoints(0.8) 'Marge haut de page ou top
.BottomMargin = Application.InchesToPoints(0.8) 'Marge bas de page si nécessaire
.Orientation = xlLandscape 'Paysage
'.Orientation = xlPortrait 'Portrait
End With
With Sheets("Stats générales").PageSetup
.LeftMargin = Application.InchesToPoints(0.8) 'Marge gauche
.RightMargin = Application.InchesToPoints(0.1) 'Marge droite
.TopMargin = Application.InchesToPoints(0.8) 'Marge haut de page ou top
.BottomMargin = Application.InchesToPoints(0.8) 'Marge bas de page si nécessaire
.Orientation = xlLandscape 'Paysage
'.Orientation = xlPortrait 'Portrait
End With
Sheets(Array("Stats population", "Stats métiers", "Stats générales")).PrintPreview 'Prévisualiser
End Sub