Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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 $-


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Slightly Urgent: Problem Resetting Chart Value Ranges

(Stupid question, I know, but it can't hurt...) And you know that the chart
you are trying to modify already has two y-variables set up? I'm not sure if
it would screw up if you didn't have a second series previously set up, but
maybe it's a shot (in the dark, *cough*).

Jim
--
I appreciate any feedback. Please don''t be scared to say that "Yes"
I/someone else did answer your question. Thank you.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Slightly Urgent: Problem Resetting Chart Value Ranges

Yes, this is an existing chart with an X and two Y's. Didn't want to muddy
the water with too much information before, but this is all contained in a
humongous macro-rich workbook that serves as a template for numerous users.
The user imports from a raw data file (Excel), does a whole series of things
to it, and one of several results is the data in the worksheet that feeds
this chart. And wouldja believe, with some source files it works and with
some (or at least one!), the aforementioned error occurs.

The infamous Column E, which appears to be the root of the problem, starts
out with formulas all the way down, but to prevent Excel from charting
zeroes, the very last VBA step just before trying to reset the chart series
evaluated the whole column and sets everything that isn't a valid, 0 number
to null.

Don't know if that will ring any Aha! bells, but I sure appreciate your
sticking with me through all this.

"J Sedoff" wrote:

(Stupid question, I know, but it can't hurt...) And you know that the chart
you are trying to modify already has two y-variables set up? I'm not sure if
it would screw up if you didn't have a second series previously set up, but
maybe it's a shot (in the dark, *cough*).

Jim
--
I appreciate any feedback. Please don''t be scared to say that "Yes"
I/someone else did answer your question. Thank you.

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
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 03:16 AM.

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"