Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem Resetting Data Source Ranges via VBA | Charts and Charting in Excel | |||
Slightly OT (Maybe) printing problem | Excel Worksheet Functions | |||
URGENT: Using Named Ranges with Chart Wizard | Excel Worksheet Functions | |||
URGENT! Need help on resetting an array | Excel Discussion (Misc queries) | |||
Resetting chart ranges | Excel Programming |