Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ali Baba
 
Posts: n/a
Default Unable to set the XValues Property

I am getting a run -time error 1004 stating it is unable to set the XValues
Property of the Series Class. I don't know why!!!

I did some changes to the old code which was running fine but this code is
annoying me .

Can anybody help plz

Sub SelectCapacity()
Sheets("Numerical Integration").ChartObjects("ChartNumInteg").Activa te
ActiveChart.PlotArea.Select
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers


Select Case CapacityCombo.Value
Case "Exponential"
With ActiveChart
.SeriesCollection(1).XValues = "=AnalysisPageNI!R4C1:R100C1"
.SeriesCollection(1).Values = "=AnalysisPageNI!R4C2:R100C2"
.SeriesCollection(1).Name = "Capacity"
End With

Case "Gumbel"
With ActiveChart
.SeriesCollection(1).XValues = "=AnalysisPageNI!R4C1:R100C1"
.SeriesCollection(1).Values = "=AnalysisPageNI!R4C3:R100C3"
.SeriesCollection(1).Name = "Capacity"
End With
End select

End Sub
  #3   Report Post  
Jon Peltier
 
Posts: n/a
Default

Also make sure that the sheet and cell references in the range are correct, and that
the range contains legitimate charting data.

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

Tushar Mehta wrote:

A good way to do some diagnostic work is to start by figuring out which
line generates the error. Also, compare the old code and the new.
What were the changes?


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
VBA error: Unable to set the Values property of the Series class Marco Shaw Charts and Charting in Excel 1 July 12th 05 02:34 PM
Can't Set XValues for Surface Chart Jack Charts and Charting in Excel 1 March 26th 05 07:06 AM
Customer Unable to Edit a Shared Workbook Lisa Excel Discussion (Misc queries) 0 February 17th 05 02:57 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
"Unable to get the NormSInv property of the WorksheetFunction clas David Roodman Excel Worksheet Functions 1 December 15th 04 12:15 PM


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