LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default creating pivot charts from multiple pages

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating multiple charts MayJuneJuly Charts and Charting in Excel 1 July 16th 08 08:43 PM
Printing charts on multiple pages Klee Charts and Charting in Excel 0 September 20th 07 02:40 PM
Chart X-axis needs to spread across multiple pages or charts Perkgolf Excel Discussion (Misc queries) 0 April 8th 07 04:08 PM
Creating multiple charts Mike Charts and Charting in Excel 2 March 23rd 07 10:47 PM
creating multiple bar charts Louise Excel Worksheet Functions 3 December 12th 06 03:26 PM


All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"