Set property for each chart series

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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
 
Back
Top