PC Review


Reply
Thread Tools Rate Thread

Cycle through pivotcharts

 
 
Michael
Guest
Posts: n/a
 
      10th Apr 2007
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 With Quote
 
 
 
 
=?Utf-8?B?R2FyeSBCcm93bg==?=
Guest
Posts: n/a
 
      10th Apr 2007
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
(E-Mail Removed)
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivotcharts Pwyd Microsoft Access 2 16th Sep 2008 03:36 PM
How to cycle through pivotCharts Michael Microsoft Excel Discussion 0 10th Apr 2007 05:22 PM
Want to cycle through PivotCharts and Charts continuasly Michael Microsoft Excel Programming 1 27th Mar 2007 11:15 PM
How do I keep result from 1 iteration cycle to use in next cycle? =?Utf-8?B?c2dsOGFrbQ==?= Microsoft Excel Misc 0 27th Jul 2006 08:28 PM
I don't want PivotCharts! Mr. Smith Microsoft Excel Discussion 1 15th Nov 2005 01:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 AM.