Mise en page pb performances

Home – Le CFO masqué Forums VBA Mise en page pb performances

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43151
    Paul
    Participant

    Bonjour,

    Je souhaite mettre en page toutes les feuilles d’un classeur. J’y arrive à l’aide de l’enregistreur de macro mais c’est vraiment trop lent. Mon code est le suivant.

    Sub Macro4()

    ‘ Macro3 Macro


    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
    .LeftFooter = “&D”
    .CenterFooter = “&F”
    .LeftMargin = Application.InchesToPoints(0.31496062992126)
    .RightMargin = Application.InchesToPoints(0.31496062992126)
    .TopMargin = Application.InchesToPoints(0.354330708661417)
    .BottomMargin = Application.InchesToPoints(0.47244094488189)
    .Orientation = xlLandscape
    .FitToPagesWide = 1
    .FitToPagesTall = 0
    End With
    Application.PrintCommunication = True
    End Sub

    Quelqu’un a une idée ?

    Merci,

    Paul

    #46508
    Consultant No.24
    Participant

    Bonjour,
    Application.PrintCommunication étant mis sur False au début de la mise en page, vous avez fait ce qu’il fallait pour accélérer le code. Mais peut-être trouvez vous cela lent car vous devez lancer la macro sur chaque feuille. Merci de préciser ce que vous trouvez lent exactement car votre code est propre.

    Cathy Monier

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.