Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Finding Chart Series Problem

Good Morning,

I've got 50 charts on one sheet; each with a varying number of lines
on each chart.
Need to adjust all the series in one move. Thought I'd be able to have
a loop within a loop:

'===========================
Sub FindChartSeries()

Dim myChartObject As ChartObject
Dim mySeries As Series

For Each myChartObject In ActiveSheet.ChartObjects

myChartObject.Select

For Each mySeries In myChartObject.SeriesCollection
MsgBox "found series"
Next

Next myChartObject

End Sub
'===========================


Why is the above bugging out?
Any help much appreciated

Jason.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Finding Chart Series Problem

Hi,

You need to include the Chart reference when using a ChartObject.

Sub FindChartSeries()

Dim myChartObject As ChartObject
Dim mySeries As Series

For Each myChartObject In ActiveSheet.ChartObjects
For Each mySeries In myChartObject.Chart.SeriesCollection
MsgBox "found series"
Next
Next myChartObject

End Sub

Cheers
Andy

WhytheQ wrote:
Good Morning,

I've got 50 charts on one sheet; each with a varying number of lines
on each chart.
Need to adjust all the series in one move. Thought I'd be able to have
a loop within a loop:

'===========================
Sub FindChartSeries()

Dim myChartObject As ChartObject
Dim mySeries As Series

For Each myChartObject In ActiveSheet.ChartObjects

myChartObject.Select

For Each mySeries In myChartObject.SeriesCollection
MsgBox "found series"
Next

Next myChartObject

End Sub
'===========================


Why is the above bugging out?
Any help much appreciated

Jason.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Finding Chart Series Problem

On 20 Nov, 10:49, Andy Pope wrote:
Hi,

You need to include the Chart reference when using a ChartObject.

Sub FindChartSeries()

Dim myChartObject As ChartObject
Dim mySeries As Series

For Each myChartObject In ActiveSheet.ChartObjects
* * *For Each mySeries In myChartObject.Chart.SeriesCollection
* * * * *MsgBox "found series"
* * *Next
Next myChartObject

End Sub

Cheers
Andy





WhytheQ wrote:
Good Morning,


I've got 50 charts on one sheet; each with a varying number of lines
on each chart.
Need to adjust all the series in one move. Thought I'd be able to have
a loop within a loop:


'===========================
Sub FindChartSeries()


Dim myChartObject As ChartObject
Dim mySeries As Series


For Each myChartObject In ActiveSheet.ChartObjects


* * * * * * myChartObject.Select


* * * * * * For Each mySeries In myChartObject.SeriesCollection
* * * * * * * * * MsgBox "found series"
* * * * * * Next


Next myChartObject


End Sub
'===========================


Why is the above bugging out?
Any help much appreciated


Jason.


--

Andy Pope, Microsoft MVP - Excelhttp://www.andypope.info- Hide quoted text -

- Show quoted text -


cheers Andy
Reply
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
Dynamic chart - series label problem pignick Charts and Charting in Excel 2 May 27th 08 07:54 PM
finding chart series low Paul Excel Programming 3 May 23rd 06 01:45 AM
Problem adding Series XValues to Chart using VBA Sean Curry Charts and Charting in Excel 0 March 14th 05 12:18 AM
Q. Pie Chart problem. Want to add series, from another worksheet. Jim Jones Excel Programming 3 January 6th 04 03:13 AM
international problem, decimal separator and chart series Brian Murphy Excel Programming 5 December 16th 03 05:04 PM


All times are GMT +1. The time now is 12:39 PM.

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"