O
Olivier
Guest
Bonjour à tous et bonne année,
J'ai une macro pour mettre en forme un classeur entier mais celle ci est excessivement lente.
Comment pourrais-je la modifier pour la rendre plus rapide.
For Each xWorksheet In ActiveWorkbook.Worksheets
xWorksheet.select
Range("G:G,I:I,J:J,M:M").Hidden = True
ActiveSheet.PageSetup.PrintArea = "$B$1:$L$59"
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintTitleRows = ""
.PrintTitleColumns = ""
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 55
End With
Next xWorksheet
Si quelqu'un peut m'aider ?
Merci
J'ai une macro pour mettre en forme un classeur entier mais celle ci est excessivement lente.
Comment pourrais-je la modifier pour la rendre plus rapide.
For Each xWorksheet In ActiveWorkbook.Worksheets
xWorksheet.select
Range("G:G,I:I,J:J,M:M").Hidden = True
ActiveSheet.PageSetup.PrintArea = "$B$1:$L$59"
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintTitleRows = ""
.PrintTitleColumns = ""
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 55
End With
Next xWorksheet
Si quelqu'un peut m'aider ?
Merci