Bug mise en page
Résolu
pascalou83400
Messages postés
277
Date d'inscription
Statut
Membre
Dernière intervention
-
pascalou83400 Messages postés 277 Date d'inscription Statut Membre Dernière intervention -
pascalou83400 Messages postés 277 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'ai bug sur une ligne de code et je ne trouve pas le pb, ce code est dans une boucle avec plusieurs feuilles.
Merci pour votre aide.
'4F) mise en page automatique
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = False
c'est celui la qui ce met en jaune.
With ActiveWorkbook.Worksheets(I).ActiveSheet.PageSetup
ActiveWorkbook.Worksheets(I).PrintTitleRows = "$16:$16"
ActiveWorkbook.Worksheets(I).PrintTitleColumns = ""
End With
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = True
ActiveWorkbook.Worksheets(I).ActiveSheet.PageSetup.PrintArea = ""
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = False
With ActiveWorkbook.Worksheets(I).ActiveSheet.PageSetup
' droite en tete
ActiveWorkbook.Worksheets(I).LeftHeader = ""
' centré verticale en tete
ActiveWorkbook.Worksheets(I).CenterHeader = "&28&A"
' gauche en tete
ActiveWorkbook.Worksheets(I).RightHeader = ""
' droite en pied
ActiveWorkbook.Worksheets(I).LeftFooter = ""
' centré horizontal pied
ActiveWorkbook.Worksheets(I).CenterFooter = "&28Page &P de &N"
' gauche pied
ActiveWorkbook.Worksheets(I).RightFooter = "&28&D"
' marge droite
ActiveWorkbook.Worksheets(I).LeftMargin = Application.InchesToPoints(0.118110236220472)
' marge gauche
ActiveWorkbook.Worksheets(I).RightMargin = Application.InchesToPoints(0.118110236220472)
' ' marge haute
ActiveWorkbook.Worksheets(I).TopMargin = Application.InchesToPoints(0.551181102362205)
' marge basse
ActiveWorkbook.Worksheets(I).BottomMargin = Application.InchesToPoints(0.354330708661417)
' marge en tete de page
ActiveWorkbook.Worksheets(I).HeaderMargin = Application.InchesToPoints(0.31496062992126)
' marge pied de page
ActiveWorkbook.Worksheets(I).FooterMargin = Application.InchesToPoints(0.118110236220472)
ActiveWorkbook.Worksheets(I).PrintHeadings = False
ActiveWorkbook.Worksheets(I).PrintGridlines = False
ActiveWorkbook.Worksheets(I).PrintComments = xlPrintNoComments
ActiveWorkbook.Worksheets(I).CenterHorizontally = True
ActiveWorkbook.Worksheets(I).CenterVertically = True
' format paysage
ActiveWorkbook.Worksheets(I).Orientation = xlLandscape
ActiveWorkbook.Worksheets(I).Draft = False
ActiveWorkbook.Worksheets(I).PaperSize = xlPaperA4
ActiveWorkbook.Worksheets(I).FirstPageNumber = xlAutomatic
ActiveWorkbook.Worksheets(I).Order = xlDownThenOver
ActiveWorkbook.Worksheets(I).BlackAndWhite = False
ActiveWorkbook.Worksheets(I).Zoom = False
ActiveWorkbook.Worksheets(I).FitToPagesWide = 1
ActiveWorkbook.Worksheets(I).FitToPagesTall = False
ActiveWorkbook.Worksheets(I).PrintErrors = xlPrintErrorsDisplayed
ActiveWorkbook.Worksheets(I).OddAndEvenPagesHeaderFooter = False
ActiveWorkbook.Worksheets(I).DifferentFirstPageHeaderFooter = False
ActiveWorkbook.Worksheets(I).ScaleWithDocHeaderFooter = True
ActiveWorkbook.Worksheets(I).AlignMarginsHeaderFooter = True
ActiveWorkbook.Worksheets(I).EvenPage.LeftHeader.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.CenterHeader.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.RightHeader.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.LeftFooter.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.CenterFooter.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.RightFooter.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.LeftHeader.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.CenterHeader.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.RightHeader.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.LeftFooter.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.CenterFooter.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.RightFooter.Text = ""
End With
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = True
J'ai bug sur une ligne de code et je ne trouve pas le pb, ce code est dans une boucle avec plusieurs feuilles.
Merci pour votre aide.
'4F) mise en page automatique
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = False
c'est celui la qui ce met en jaune.
With ActiveWorkbook.Worksheets(I).ActiveSheet.PageSetup
ActiveWorkbook.Worksheets(I).PrintTitleRows = "$16:$16"
ActiveWorkbook.Worksheets(I).PrintTitleColumns = ""
End With
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = True
ActiveWorkbook.Worksheets(I).ActiveSheet.PageSetup.PrintArea = ""
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = False
With ActiveWorkbook.Worksheets(I).ActiveSheet.PageSetup
' droite en tete
ActiveWorkbook.Worksheets(I).LeftHeader = ""
' centré verticale en tete
ActiveWorkbook.Worksheets(I).CenterHeader = "&28&A"
' gauche en tete
ActiveWorkbook.Worksheets(I).RightHeader = ""
' droite en pied
ActiveWorkbook.Worksheets(I).LeftFooter = ""
' centré horizontal pied
ActiveWorkbook.Worksheets(I).CenterFooter = "&28Page &P de &N"
' gauche pied
ActiveWorkbook.Worksheets(I).RightFooter = "&28&D"
' marge droite
ActiveWorkbook.Worksheets(I).LeftMargin = Application.InchesToPoints(0.118110236220472)
' marge gauche
ActiveWorkbook.Worksheets(I).RightMargin = Application.InchesToPoints(0.118110236220472)
' ' marge haute
ActiveWorkbook.Worksheets(I).TopMargin = Application.InchesToPoints(0.551181102362205)
' marge basse
ActiveWorkbook.Worksheets(I).BottomMargin = Application.InchesToPoints(0.354330708661417)
' marge en tete de page
ActiveWorkbook.Worksheets(I).HeaderMargin = Application.InchesToPoints(0.31496062992126)
' marge pied de page
ActiveWorkbook.Worksheets(I).FooterMargin = Application.InchesToPoints(0.118110236220472)
ActiveWorkbook.Worksheets(I).PrintHeadings = False
ActiveWorkbook.Worksheets(I).PrintGridlines = False
ActiveWorkbook.Worksheets(I).PrintComments = xlPrintNoComments
ActiveWorkbook.Worksheets(I).CenterHorizontally = True
ActiveWorkbook.Worksheets(I).CenterVertically = True
' format paysage
ActiveWorkbook.Worksheets(I).Orientation = xlLandscape
ActiveWorkbook.Worksheets(I).Draft = False
ActiveWorkbook.Worksheets(I).PaperSize = xlPaperA4
ActiveWorkbook.Worksheets(I).FirstPageNumber = xlAutomatic
ActiveWorkbook.Worksheets(I).Order = xlDownThenOver
ActiveWorkbook.Worksheets(I).BlackAndWhite = False
ActiveWorkbook.Worksheets(I).Zoom = False
ActiveWorkbook.Worksheets(I).FitToPagesWide = 1
ActiveWorkbook.Worksheets(I).FitToPagesTall = False
ActiveWorkbook.Worksheets(I).PrintErrors = xlPrintErrorsDisplayed
ActiveWorkbook.Worksheets(I).OddAndEvenPagesHeaderFooter = False
ActiveWorkbook.Worksheets(I).DifferentFirstPageHeaderFooter = False
ActiveWorkbook.Worksheets(I).ScaleWithDocHeaderFooter = True
ActiveWorkbook.Worksheets(I).AlignMarginsHeaderFooter = True
ActiveWorkbook.Worksheets(I).EvenPage.LeftHeader.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.CenterHeader.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.RightHeader.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.LeftFooter.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.CenterFooter.Text = ""
ActiveWorkbook.Worksheets(I).EvenPage.RightFooter.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.LeftHeader.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.CenterHeader.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.RightHeader.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.LeftFooter.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.CenterFooter.Text = ""
ActiveWorkbook.Worksheets(I).FirstPage.RightFooter.Text = ""
End With
ActiveWorkbook.Worksheets(I).Application.PrintCommunication = True
A voir également:
- Bug mise en page
- Mise en forme conditionnelle excel - Guide
- Supprimer page word - Guide
- Mise a jour chrome - Accueil - Applications & Logiciels
- Mise a jour windows 10 - Accueil - Mise à jour
- Mettre google en page d'accueil - Guide
3 réponses
Bonjour,
Dans le VisualBasic Editor, ouvre la fenêtre "Fenêtre Variable Local" dans le menu View et essayes de faire fonctionner ta macro Pas à Pas avec la touche F8.
Cette fenêtre te permettra éventuellement de déceller une anomalie au niveau du contenu d'une variable
Si ce code est une boucle avec plusieurs Feuilles, assures que toutes les feuilles mentionné dans le code existent encore sur le fichier Excel.
Dans le VisualBasic Editor, ouvre la fenêtre "Fenêtre Variable Local" dans le menu View et essayes de faire fonctionner ta macro Pas à Pas avec la touche F8.
Cette fenêtre te permettra éventuellement de déceller une anomalie au niveau du contenu d'une variable
Si ce code est une boucle avec plusieurs Feuilles, assures que toutes les feuilles mentionné dans le code existent encore sur le fichier Excel.