View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default looping through series

Hi,

Will something like this achieve your desired outcome. You don't need to
test when it is finished because .SeriesCollection.Count sets the number of
times to loop.

Set you border weight to whatever you want.

Sub Test()
ActiveSheet.ChartObjects("Chart 1").Activate
With ActiveChart
For i = 1 To .SeriesCollection.Count
.SeriesCollection(i).Border.Weight = xlThick
Next i
End With
End Sub

Regards,

OssieMac


"raymondvillain" wrote:

I need to do the same thing to every series on a chart. Some of my charts
have 8 to 10 series lines drawn on them. I know how to write a loop, but I
don't know what the maximum number of SeriesCollection(?)'s is. I want to do
something like

While [what should the test be?]
ActiveChart.SeriesCollection(?).Border.Weight = 1
Wend

Does this make sense?
--
leave well enough alone