LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default iterate through chart series collection

sorry to be bugging the group so mych about charts but Im getting my
butt kicked. The new problem is this:

Building a column chart and needing to add the series x axis labels
which are set in VBA with
..SeriesCollection(#).XValues for each series. I need to set them all
to a named range(the same range of cells)
Im working with: some code removed for clearity)

Dim aChart As Chart
Dim shtNm As String
shtNm = ActiveSheet.Name

Set aChart = Charts.Add
Set aChart = aChart.Location(Whe=xlLocationAsObject,
Name:=shtNm)

Dim xSer As SeriesCollection
For Each xSer In aChart
.XValues = Range("code")
Next

I can set each series individuly but I need to set them as one because
the number of series is variable and can change each time the macro
runs. The named range "CODE" is always the correct size to match the
number in the series.

is there a way to make this work?
Thanks
Robert

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Series Collection Name Problem madeleine[_2_] Excel Programming 2 November 28th 06 03:07 PM
Series collection pb on Ecxel 2003 chart David Excel Programming 2 November 15th 06 05:19 PM
Use "For... Each" to Iterate Through a Cells Collection? BobbyMurcerFan Excel Programming 1 March 18th 06 07:27 PM
Series Collection Points Bill[_28_] Excel Programming 12 September 29th 04 04:21 PM
Iterate over Collection Objects in Container. Bob Kilmer Excel Programming 1 August 28th 03 02:37 AM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"