LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel Chart Add Series with VBA

On Jul 3, 1:36 pm, Juan Schwartz wrote:
On Jul 3, 1:34 pm, Juan Schwartz wrote:



Let's say


chartdepth = "0,1,2,3,4,5,6,7"
chartdays = "0,1,2,3,4,5,6,7,8,9"


When I execute the following code, the values for .XValues fills in
just fine, but the data for .Values just sits at 0.


Dim MyNewSrs As Series
Set MyNewSrs = ActiveChart.SeriesCollection.NewSeries
With MyNewSrs
.Name = well_array(k, 2)
MsgBox (chartdepth)
.Values = Array(chartdepth)
.XValues = Array(chartdays)
End With


Can anyone help me out?


Just to add, the "arrays" have the same number of items in each...


Figured it out... you just don't put ARRAY() around the vars



chartdepth = "0,1,2,3,4,5,6,7"
chartdays = "2,3,4,5,6,7,8,9"

Dim MyNewSrs As Series
Set MyNewSrs = ActiveChart.SeriesCollection.NewSeries
With MyNewSrs
.Name = well_array(k, 2)
MsgBox (chartdepth)
.Values = Array(chartdepth)
.XValues = Array(chartdays)
End With

 
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
excel chart maximum series should more than 255 series kameking Charts and Charting in Excel 5 August 22nd 10 10:52 AM
User Selectable Series and Number of Series for Line Chart Dave in NJ Charts and Charting in Excel 2 February 23rd 09 12:18 AM
how to plot column chart with one series against multiple series. svenkateshmurthy Charts and Charting in Excel 2 October 16th 07 09:09 PM
Add Series to a chart failure and Disappearing Series GEOTEC Excel Programming 0 October 26th 05 04:13 PM
chart data series -- plot a table as a single series hjc Charts and Charting in Excel 7 September 20th 05 05:52 PM


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