A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

series objects; finding specific ones in the collection



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2010, 04:17 PM posted to microsoft.public.excel.charting
cate
external usenet poster
 
Posts: 8
Default series objects; finding specific ones in the collection

When ever I wish to create a new series, no big deal:

Dim SeriesRandTarget As Series
Set SeriesRandTarget = myChart.SeriesCollection.NewSeries

As long as I have the object, I can use it. If I set the name
attribute as in
SeriesRandTarget .Name = "Hello"
I can collect it later if needed by:
Set myseries = myChart.SeriesCollection("Hello")

But what about this? What is the new series name I just created in
the below example? (The macro recorder has me in this fix!)

myChart.SeriesCollection.Paste Rowcol:=xlColumns,
SeriesLabels:=False, _
CategoryLabels:=True, Replace:=False, NewSeries:=True

The next recorded step is

myChart.SeriesCollection(4).Select

I tried slipping in Name:="My Name", but it croaks. How do you find
this series?

thank you
  #2  
Old April 4th, 2010, 12:53 PM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default series objects; finding specific ones in the collection

Hi,

Maybe you can use the counter of the collection.


set myseries = myChart.SeriesCollection(myChart.SeriesCollection. count)

Cheers
Andy

On 03/04/2010 16:17, cate wrote:
When ever I wish to create a new series, no big deal:

Dim SeriesRandTarget As Series
Set SeriesRandTarget = myChart.SeriesCollection.NewSeries

As long as I have the object, I can use it. If I set the name
attribute as in
SeriesRandTarget .Name = "Hello"
I can collect it later if needed by:
Set myseries = myChart.SeriesCollection("Hello")

But what about this? What is the new series name I just created in
the below example? (The macro recorder has me in this fix!)

myChart.SeriesCollection.Paste Rowcol:=xlColumns,
SeriesLabels:=False, _
CategoryLabels:=True, Replace:=False, NewSeries:=True

The next recorded step is

myChart.SeriesCollection(4).Select

I tried slipping in Name:="My Name", but it croaks. How do you find
this series?

thank you


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3  
Old April 4th, 2010, 03:25 PM posted to microsoft.public.excel.charting
cate
external usenet poster
 
Posts: 8
Default series objects; finding specific ones in the collection

On Apr 4, 6:53*am, Andy Pope wrote:
Hi,

Maybe you can use the counter of the collection.

set myseries = myChart.SeriesCollection(myChart.SeriesCollection. count)


I'll try it. I assume these are incrementing. Thanks.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.