Sub BoutonPrintPDF()
Application.ScreenUpdating = False
'Dim Sh1 As Worksheet
Dim Sh2 As Worksheet
Dim Sh3 As Worksheet
'Set Sh1 = Feuil1 'Codename de la feuille "Menu"
Set Sh2 = Feuil1 'A adapter en fonction du codename de la feuille "Meteo"
Set Sh3 = Feuil2 'A adapter en fonction du codename de la feuille "Analyse"
With Sh2.PageSetup
.PrintArea = "A4:X50" 'Zone d'impression à adapter de la feuille Meteo
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
'Réglage des marges
.LeftMargin = Application.InchesToPoints(0.1) 'Marge gauche
.RightMargin = Application.InchesToPoints(0.1) 'Marge droite
.TopMargin = Application.InchesToPoints(0.1) 'Marge haut de page
.BottomMargin = Application.InchesToPoints(0.1) 'Marge bas de page
' .Orientation = xlLandscape 'Paysage
.Orientation = xlPortrait 'Portrait
End With
With Sh3.PageSetup
.PrintArea = "A2:M30" 'Zone d'impression à adapter de la feuille Analyse
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
'Réglage des marges
.LeftMargin = Application.InchesToPoints(0.1) 'Marge gauche
.RightMargin = Application.InchesToPoints(0.1) 'Marge droite
.TopMargin = Application.InchesToPoints(0.1) 'Marge haut de page
.BottomMargin = Application.InchesToPoints(0.1) 'Marge bas de page
.Orientation = xlLandscape 'Paysage
'.Orientation = xlPortrait 'Portrait
End With
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ThisWorkbook.Path & "\" & "Meteo_Analyse.pdf"
Set Sh2 = Nothing 'Decharge la feuille 2
Set Sh3 = Nothing 'Decharge la feuille 3
Application.ScreenUpdating = True
End Sub