Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 73
Default Problem Resetting Data Source Ranges via VBA

I have a macro that is supposed to reset three data ranges (one X, two Y)
based on the number of data rows in the current worksheet. The first two
work fine, the third one errors out, saying it is "unable to set the Values
property of the Series class." I'm I'm darned if I can see why, as the code
seems identical to the two previous lines. The code follows, and below that
a sample of the data it's referring to:

Sheets("S-curve Chart").Select
ActiveChart.ChartArea.Select
##works## ActiveChart.SeriesCollection(1).XValues = "='S-curve Chart
Data'!R2C1:R" & Chart6LastRow & "C1"
##works## ActiveChart.SeriesCollection(1).Values = "='S-curve Chart
Data'!R2C3:R" & Chart6LastRow & "C3"
##fails## ActiveChart.SeriesCollection(2).Values = "='S-curve Chart
Data'!R2C5:R" & Chart6LastRow & "C5"
ActiveChart.Deselect


Here's a few rows of the data from the worksheet (note that the code is using
columns A, C, and E, and note also that further down, ColE DOES have data in
it):
ColA ColB ColC ColD ColE
181 $0 $0 $-
180 $- $0 $-
179 $- $0 $-
178 $- $0 $-
177 $- $0 $-
176 $- $0 $-
175 $- $0 $-

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
Multi Area data ranges as Chart source GS80 Charts and Charting in Excel 2 January 30th 08 09:54 AM
Excel 2003 color resetting problem Sunny Excel Discussion (Misc queries) 0 December 19th 06 12:28 AM
Creating a list (data validation) fromt wo different source ranges tony Excel Discussion (Misc queries) 1 August 1st 06 03:40 AM
Pivot Table - Data Source problem Kam Excel Worksheet Functions 0 June 29th 05 12:46 AM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


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