Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write a macro that creates seperate pivot charts for the
different pages of a pivot table. What I'm doing now returns the data of the same page on 2 different charts. ' Loop through each client For Each PivItem In PT.PivotFields("Client").PivotItems Ctr = Ctr + 1 PT.PivotFields("Client").CurrentPage = PivItem.Name PT.ManualUpdate = False PT.ManualUpdate = True ' create the chart Charts.Add ActiveChart.SetSourceData Source:=Sheets("data").Range("Am4") ActiveChart.Location Whe=xlLocationAsNewSheet ActiveChart.ChartType = xlColumnClustered ActiveChart.ApplyDataLabels Type:=xlDataLabelsShowValue, LegendKey:=False, _ HasLeaderLines:=True With Selection.Font .Name = "Arial" .FontStyle = "Bold" .Size = 12 End With ActiveChart.PlotArea.Select With Selection.Border .ColorIndex = 16 .Weight = xlThin .LineStyle = xlContinuous End With Selection.Interior.ColorIndex = xlNone ActiveChart.Axes(xlValue).MajorGridlines.Select With Selection.Border .ColorIndex = 15 .Weight = xlHairline .LineStyle = xlContinuous End With ActiveSheet.Name = PivItem.Name & " Att Chart" Next PivItem Why am I not getting the different clients (pages) on different sheets? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating multiple charts | Charts and Charting in Excel | |||
Printing charts on multiple pages | Charts and Charting in Excel | |||
Chart X-axis needs to spread across multiple pages or charts | Excel Discussion (Misc queries) | |||
Creating multiple charts | Charts and Charting in Excel | |||
creating multiple bar charts | Excel Worksheet Functions |