Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Assigning data source to chart

Set the Values and XValues properties to be the actual
range object, not a formula - for you this is complicated
by the fact that you can't use R1C1 notation for the range
address, but this should work:

ActiveChart.SeriesCollection(ColNum).XValues =
ActiveSheet.Range(ActiveSheet.Cells(i +
1,2),ActiveSheet.Cells(i + 1,10))

etc...


-----Original Message-----
I am trying to add a number of data series to a chart

however I get an error
(object doesn't support this property or method) when

running this piece of
code.

Dim Cname, i, ColNum
Cname = "Cht-" & ActiveSheet.Name

Charts.add.Name = Cname
ActiveChart.ChartType = xlXYScatter
ColNum = 1
i = 3
Do Until ActiveSheet.Range("A" & i) = ""
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(ColNum).XValues

= "=" &
ActiveSheet.Name & _
"!R" & i + 1 & "C2:R" & i + 1 & "C10"
ActiveChart.SeriesCollection(ColNum).Values = "="

& ActiveSheet.Name
& _
"!R" & i + 2 & "C2:R" & i + 2 & "C10"
ActiveChart.SeriesCollection(ColNum).Name = "=" &

ActiveSheet.Name & _
"!R" & i & "C1"
i = i + 6
ColNum = ColNum + 1
Loop
ActiveChart.Location Whe=xlLocationAsObject,

Name:=ActiveSheet.Name

It might not be the right way to do this so any

suggestions are welcome.

Thanks
The Doctor
.

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
Assigning A Value Axis to a Data Series in a Combination Chart controllerjack Setting up and Configuration of Excel 0 August 27th 07 10:42 PM
pie chart & column chart w/same source data martymi Charts and Charting in Excel 2 May 1st 07 04:25 PM
Use detailed data in one worksheet to create summary data as chart source rdemyan Charts and Charting in Excel 0 January 23rd 07 02:18 PM
How do you link chart source data when you copy the chart? mamagirl Charts and Charting in Excel 1 December 8th 06 02:40 AM
Update a chart immediately after inputting data into data source MELMEL Charts and Charting in Excel 1 December 1st 05 09:34 PM


All times are GMT +1. The time now is 02:29 PM.

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

About Us

"It's about Microsoft Excel"