Set property for each chart series

G

Guest

When the data for a pivotchart is refreshed some of the formatting is lost.
The number of series may change each time the data is refreshed so I think I
need a loop something like:

Charts("myChart").Activate
With ActiveChart

While SeriesCollection < SeriesCollection.Count
SeriesCollection.Border.Weight = xlMedium
Wend
End With

Help appreciated.
 
G

Guest

I wrote a macro for a co-worker last month that changes series formatting on
pivottables. If you'd like a copy email me @ (e-mail address removed)
remove NOSPAM obviously, and I'll reply with the workbook. Otherwise I prefer
to declare a series object then use a for each loop like this:
Dim srs as Series
For Each srs in ActiveChart.SeriesCollection
'format properties
Next
 
G

Guest

Thanks

Charles Chickering said:
I wrote a macro for a co-worker last month that changes series formatting on
pivottables. If you'd like a copy email me @ (e-mail address removed)
remove NOSPAM obviously, and I'll reply with the workbook. Otherwise I prefer
to declare a series object then use a for each loop like this:
Dim srs as Series
For Each srs in ActiveChart.SeriesCollection
'format properties
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top