Show Pages isn't available for a Pivot Chart. You could use code similar
to the following to print or preview the chart for each item in the page
field.
'==========================
Sub PrintPivotChart()
'prints a chart for each item in the page field
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Set pt = Worksheets("Pivot").PivotTables(1)
For Each pf In pt.PageFields
For Each pi In pf.PivotItems
pt.PivotFields(pf.Name).CurrentPage = pi.Name
' ActiveWorkbook.Charts("Chart1").PrintOut
ActiveWorkbook.Charts("Chart1").PrintPreview
Next
Next pf
End Sub
'=============================
marina madeleine wrote:
I had posted this question before and am wondering if anyone knows how
to do a "show pages" for an excel pivot table chart. This is to
generate the chart/graphs for the very many countries who have data in
the pivot table.
I am able to do a "show pages" for the table form of a pivot table. But
for the chart/graph I don`t seem to be able to find a "show pages" on
the wizard menu.
Is there a way to do this or would it be necessary to do this by visual
basic?
Thanks.
Marina Madeleine
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html