|
|
|
|
Bonjour,
J'aimerai savoir quelle est la démarche pour pouvoir imprimer un tableau croisé dynamique sur Excel, selon que le nombre données changent.
En effet, je sélectionnais jusqu'à présent mon tableau croisé dynamique et faisais Fichier / Zone d'impression / Définir et cela m'imprimait mon tableau correctement.
Seulement, quand j'actualise les données (en + ou en -), l'impression se fait sur la base de mon premier tableau et ignore les nouvelles lignes / colonnes de mon nouveau tableau.
Je serai très heureux si quelqu'un connait la démarche.
D'avance, je vous remercie pour vos réponses.
Karaboudjan
Configuration: Windows XP Firefox 2.0.0.14
Répondre à karaboudjan
|
Salut,
|
Répondre à karaboudjan
|
Le code au cas où :
Sub Impression()
Range("a1").Select
ActiveSheet.PageSetup.PrintArea = ""
ActiveSheet.PivotTables("Tableau croisé dynamique1").PivotSelect "", _
xlDataAndLabel
ActiveSheet.PageSetup.PrintArea = "$H$3:$K$37"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Page &P de &N"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.78740157480315)
.RightMargin = Application.InchesToPoints(0.78740157480315)
.TopMargin = Application.InchesToPoints(0.984251968503937)
.BottomMargin = Application.InchesToPoints(0.984251968503937)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub |