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: 73
Default Slightly Urgent: Problem Resetting Chart Value Ranges

WITH APOLOGIES FOR RE-POSTING, PUT IT IN CHARTS ORIGINALLY AND GOT NO
RESPONSES.

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. The code is referring to
columns A, C, and E, and further down, Col E DOES have data in
it. I thought the latter (i.e., nulls in the first several rows) might be
causing the error, but filling Col E with zeroes or other values didn't help.

ColA ColB ColC ColD ColE
181 $0 $0 $-
180 $- $0 $-
179 $- $0 $-
178 $- $0 $-
177 $- $0 $-
176 $- $0 $-
175 $- $0 $-


 
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
Problem Resetting Data Source Ranges via VBA LarryP Charts and Charting in Excel 0 August 4th 08 08:34 PM
Slightly OT (Maybe) printing problem Meebers Excel Worksheet Functions 3 July 9th 07 12:18 PM
URGENT: Using Named Ranges with Chart Wizard artisdepartis Excel Worksheet Functions 4 July 3rd 07 07:46 AM
URGENT! Need help on resetting an array NSKearns Excel Discussion (Misc queries) 0 August 17th 06 09:28 AM
Resetting chart ranges Maury Markowitz Excel Programming 0 January 12th 05 04:13 PM


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