Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Unable to set the xvalues property of the series class for a single row of source data

Hello All,

The following code works if there is more than one row of source
data.

ActiveChart.SeriesCollection(1).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(1).Values = "='" & ws.Name & "'!
R2C4:R" & LastRow + 1 & "C4"
ActiveChart.SeriesCollection(1).Name = "='" & ws.Name & "'!
R1C4"
ActiveChart.SeriesCollection(2).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(2).Values = "='" & ws.Name & "'!
R2C5:R" & LastRow + 1 & "C5"
ActiveChart.SeriesCollection(2).Name = "='" & ws.Name & "'!
R1C5"
ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(3).Values = "='" & ws.Name & "'!
R2C6:R" & LastRow + 1 & "C6"
ActiveChart.SeriesCollection(3).Name = "='" & ws.Name & "'!
R1C6"

Otherwise (if LastRow = 1), the following line

ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!R2C3:R"
& LastRow + 1 & "C3"

gives the following error

Unable to set the xvalues property of the series class

I am able to set the xvalues property for both SeriesCollection(1) and
SeriesCollection(2) to the same range that I am attempting to set
SeriesCollection(3)'s to. The range is non-empty and contains less
than 253 cells.

Any ideas as to what may be causing this? I appreciate any effort to
help me. Thank you for your time and consideration.

Sincerely,
Sisilla

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Unable to set the xvalues property of the series class for a singl

Enclose the code in an If statement:

If LastRow 1 Then

'Your code

Else 'Put in new line to process single line of source data

End If

"Sisilla" wrote:

Hello All,

The following code works if there is more than one row of source
data.

ActiveChart.SeriesCollection(1).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(1).Values = "='" & ws.Name & "'!
R2C4:R" & LastRow + 1 & "C4"
ActiveChart.SeriesCollection(1).Name = "='" & ws.Name & "'!
R1C4"
ActiveChart.SeriesCollection(2).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(2).Values = "='" & ws.Name & "'!
R2C5:R" & LastRow + 1 & "C5"
ActiveChart.SeriesCollection(2).Name = "='" & ws.Name & "'!
R1C5"
ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(3).Values = "='" & ws.Name & "'!
R2C6:R" & LastRow + 1 & "C6"
ActiveChart.SeriesCollection(3).Name = "='" & ws.Name & "'!
R1C6"

Otherwise (if LastRow = 1), the following line

ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!R2C3:R"
& LastRow + 1 & "C3"

gives the following error

Unable to set the xvalues property of the series class

I am able to set the xvalues property for both SeriesCollection(1) and
SeriesCollection(2) to the same range that I am attempting to set
SeriesCollection(3)'s to. The range is non-empty and contains less
than 253 cells.

Any ideas as to what may be causing this? I appreciate any effort to
help me. Thank you for your time and consideration.

Sincerely,
Sisilla


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Unable to set the xvalues property of the series class for a single row of source data

What kind of chart? In a line or XY chart, if a series is not plotted
because it contains all blanks or errors, then you cannot access its
..XValues, .Values, and some other properties. Temporarily change the chart
type to column, change the properties, and change the chart type to what it
was.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Sisilla" wrote in message
oups.com...
Hello All,

The following code works if there is more than one row of source
data.

ActiveChart.SeriesCollection(1).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(1).Values = "='" & ws.Name & "'!
R2C4:R" & LastRow + 1 & "C4"
ActiveChart.SeriesCollection(1).Name = "='" & ws.Name & "'!
R1C4"
ActiveChart.SeriesCollection(2).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(2).Values = "='" & ws.Name & "'!
R2C5:R" & LastRow + 1 & "C5"
ActiveChart.SeriesCollection(2).Name = "='" & ws.Name & "'!
R1C5"
ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(3).Values = "='" & ws.Name & "'!
R2C6:R" & LastRow + 1 & "C6"
ActiveChart.SeriesCollection(3).Name = "='" & ws.Name & "'!
R1C6"

Otherwise (if LastRow = 1), the following line

ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!R2C3:R"
& LastRow + 1 & "C3"

gives the following error

Unable to set the xvalues property of the series class

I am able to set the xvalues property for both SeriesCollection(1) and
SeriesCollection(2) to the same range that I am attempting to set
SeriesCollection(3)'s to. The range is non-empty and contains less
than 253 cells.

Any ideas as to what may be causing this? I appreciate any effort to
help me. Thank you for your time and consideration.

Sincerely,
Sisilla



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Unable to set the xvalues property of the series class for a single row of source data

On May 9, 4:10 pm, "Jon Peltier"
wrote:
What kind of chart? In a line or XY chart, if a series is not plotted
because it contains all blanks or errors, then you cannot access its
.XValues, .Values, and some other properties. Temporarily change the chart
type to column, change the properties, and change the chart type to what it
was.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutionshttp://PeltierTech.com
_______

"Sisilla" wrote in message

oups.com...



Hello All,


The following code works if there is more than one row of source
data.


ActiveChart.SeriesCollection(1).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(1).Values = "='" & ws.Name & "'!
R2C4:R" & LastRow + 1 & "C4"
ActiveChart.SeriesCollection(1).Name = "='" & ws.Name & "'!
R1C4"
ActiveChart.SeriesCollection(2).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(2).Values = "='" & ws.Name & "'!
R2C5:R" & LastRow + 1 & "C5"
ActiveChart.SeriesCollection(2).Name = "='" & ws.Name & "'!
R1C5"
ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!
R2C3:R" & LastRow + 1 & "C3"
ActiveChart.SeriesCollection(3).Values = "='" & ws.Name & "'!
R2C6:R" & LastRow + 1 & "C6"
ActiveChart.SeriesCollection(3).Name = "='" & ws.Name & "'!
R1C6"


Otherwise (if LastRow = 1), the following line


ActiveChart.SeriesCollection(3).XValues = "='" & ws.Name & "'!R2C3:R"
& LastRow + 1 & "C3"


gives the following error


Unable to set the xvalues property of the series class


I am able to set the xvalues property for both SeriesCollection(1) and
SeriesCollection(2) to the same range that I am attempting to set
SeriesCollection(3)'s to. The range is non-empty and contains less
than 253 cells.


Any ideas as to what may be causing this? I appreciate any effort to
help me. Thank you for your time and consideration.


Sincerely,
Sisilla- Hide quoted text -


- Show quoted text -


Jon & JLG,

Thank you for your efforts to help me. I greatly appreciate it. The
range for the XValues was non-empty, but the range for the
SeriesCollection's Values was empty.

Again Thanks,
Sisilla

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
Unable to set the XValues property of the Series class Ben Charts and Charting in Excel 7 December 7th 06 10:01 PM
Unable to set XValues Property of Series Class DynamiteSkippy Excel Programming 2 May 15th 06 09:15 PM
Unable to set the XValues property of the Series class ramkumar_cpt Charts and Charting in Excel 5 November 29th 05 02:13 PM
Unable to Set XValues property of the Series class PGalla06[_18_] Excel Programming 0 September 30th 05 04:16 PM
Unable to set the XValues property of the Series class David Mullins via OfficeKB.com Excel Programming 0 January 26th 05 02:54 PM


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