'****************************************
'IMPRIMER 3 PAGES DEPUIS LA PAGE ACCUEIL
'****************************************
Sub ButtonPrintStats()
Application.ScreenUpdating = False
'Je démasque les feuilles
'Nom à adapter en fonction des feuilles qui sont masquées
Sheets("Stats population").Visible = True
Sheets("Stats métiers").Visible = True
'La procédure impression ....
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
.PrintArea = "C4:M26" 'Zone d'impression
.FitToPagesWide = 1
.FitToPagesTall = 1
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
.PrintArea = "D5:N27" 'Zone d'impression
.FitToPagesWide = 1
.FitToPagesTall = 1
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
.PrintArea = "E6:O28" 'Zone d'impression
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Sheets(Array("Stats population", "Stats métiers", "Stats générales")).PrintPreview 'Prévisualiser
'Je remasque les feuilles
Sheets("Stats population").Visible = False
Sheets("Stats métiers").Visible = False
Application.ScreenUpdating = True
End Sub