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: 43
Default How many series does this code create???

I can't seem to figure out how XL is using the following code. I am
trying to create a scatter plot of 2 series. Sometimes I get the 2
series as desired and sometimes I get 3 series. This 3rd series is
empty (has been created, but the source data not set). I've checked
the SeriesCollection.Count property at various places during the
process. Before the first .SeriesCollection.NewSeries line the count
is 0 and immediately after it is 1 (as it should be). So it seems to
me that if the chart is created with 0 series and I want 2, then I must
create them. How can I ever get 3 with this code???

Thanks,
John

================================================== =========
Charts.Add
ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Duration
Plot"
ActiveChart.ChartType = xlXYScatterLines

With Charts("Duration Plot")
.SeriesCollection.NewSeries
.SeriesCollection(1).XValues = rngStartDates
.SeriesCollection(1).Values = "=Dates!R1C3:R52C3"
.SeriesCollection(1).Border.Weight = xlThin
.SeriesCollection(1).Border.ColorIndex = 11
.SeriesCollection(1).Name = "Req'd Calendar Days"

.SeriesCollection.NewSeries
.SeriesCollection(2).XValues = "=Dates!R1C1:R52C1"
.SeriesCollection(2).Values = "=Dates!R1C2:R52C2"
.SeriesCollection(2).Border.Weight = xlThick
.SeriesCollection(2).Border.ColorIndex = 7
.SeriesCollection(2).AxisGroup = 2
.SeriesCollection(2).MarkerStyle = xlNone
.SeriesCollection(2).Name = "Completion Date"
================================================== =========
There is a good bit more code, but it is just formatting things.

 
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
How create a formula series with series inside Ric Excel Worksheet Functions 3 September 16th 09 03:09 AM
how to create a series of numbers passion_queen Excel Discussion (Misc queries) 6 January 30th 09 08:49 PM
Need to create a series of dates across a row Equinor Excel Discussion (Misc queries) 4 January 26th 09 05:32 PM
How to Create a Date Series across a row? Equinor Excel Discussion (Misc queries) 3 February 26th 08 03:07 AM
How to create a form to insert a hyerlink.VBA code to create a for karthi Excel Discussion (Misc queries) 0 July 5th 06 11:26 AM


All times are GMT +1. The time now is 04:54 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"