1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Sub Miseenforme()
With ActiveSheet.PageSetup 'changement des marges, forme paysage et répétition en-tête
.PrintTitleRows = "$1:$1"
.LeftMargin = Application.InchesToPoints(0.275590551181102)
.RightMargin = Application.InchesToPoints(0.31496062992126)
.TopMargin = Application.InchesToPoints(0.393700787401575)
.BottomMargin = Application.InchesToPoints(0.47244094488189)
.HeaderMargin = Application.InchesToPoints(0.236220472440945)
.FooterMargin = Application.InchesToPoints(0.275590551181102)
.Orientation = xlLandscape
.Zoom = 75
End With
With Cells.Select 'sélection de toutes les cellules et tri colonne A ordre croissant
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With
'A CHAQUE CHANGEMENT DE VALEUR INSERER UN SAUT DE PAGE
'SELECTIONNER L'IMPRIMANTE PAR DEFAUT
ActiveSheet.PrintOut 'imprimer les pages de la feuille
Application.ScreenUpdating = True
ActiveWorkbook.Close False 'fermer le classeur sans enregistrer
End Sub |
Partager