Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cycle through pivotcharts
Helo everyone,
I have 2 pivotcharts. I want to write some sample code that cycles through the 2 pivotcharts. Any ideas? My sample code doesn't work For Each wsChart In Charts Select Case wsChart.Name Case "CTDefectsByDateChart" wsChart("CTDefectsByDateChart").Visible = True wsChart("AgingDefectsChart").Visible = False Case "AgingDefectsChart" wsChart("CTDefectsByDateChart").Visible = False wsChart("AgingDefectsChart").Visible = True End Select Next wsChart Thanks Michael |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cycle through pivotcharts
Off the top of my head, I would think that first you need to declare wsChart
Dim wsChart as chart and 2nd use... wsChart.Visible = True instead of.. wsChart("CTDefectsByDateChart").Visible = True Untested.... but hope this helps. -- Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "Michael" wrote: Helo everyone, I have 2 pivotcharts. I want to write some sample code that cycles through the 2 pivotcharts. Any ideas? My sample code doesn't work For Each wsChart In Charts Select Case wsChart.Name Case "CTDefectsByDateChart" wsChart("CTDefectsByDateChart").Visible = True wsChart("AgingDefectsChart").Visible = False Case "AgingDefectsChart" wsChart("CTDefectsByDateChart").Visible = False wsChart("AgingDefectsChart").Visible = True End Select Next wsChart Thanks Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save as PDF or XPS distorts pivotcharts | Charts and Charting in Excel | |||
How do I make a graph with 2-cycle X 3-cycle log-log graph paper? | Charts and Charting in Excel | |||
Want to cycle through PivotCharts and Charts continuasly | Excel Programming | |||
How do I keep result from 1 iteration cycle to use in next cycle? | Excel Discussion (Misc queries) | |||
Having an issue with some pivotcharts? | Charts and Charting in Excel |