Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jack
 
Posts: n/a
Default Can't Set XValues for Surface Chart

Hi

I'm trying to generate a 3D surface plot in VBA. When I
try to assign an address range to the XValues property of
a seriescollection, I get "unable to set the XValues
property of the series class". I am able to set the Name
Property, but not the XValue property.

The sample code snippet:
=============================
Charts.Add
ActiveChart.ChartType = xlSurface
ActiveChart.SetSourceData Source:=Sheets(sheetName).Range
(chartDataRange _
), PlotBy:=xlColumns

ActiveChart.ChartArea.Select

ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection
(1).XValues= "=RAW_ping_output!R5C9:R18C9"

===============================
  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default

Jack -

With surface charts, you can do some of these things manually, and even
record a macro while doing it, and then the macro will fail no matter
how you rearrange and cajole the lines. All I've ever been able to do is
reset the entire source data range. You can use a discontiguous range if
you need to omit a row in the middle.

One thing I didn't try is to set all the .Names of all the series, then
change from ByRow to ByColumn (or vice versa), then change all of the
..Names of all the perpendicular series, and finally change back from
ByColumn to ByRow. Let me know if this works.

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

Jack wrote:

Hi

I'm trying to generate a 3D surface plot in VBA. When I
try to assign an address range to the XValues property of
a seriescollection, I get "unable to set the XValues
property of the series class". I am able to set the Name
Property, but not the XValue property.

The sample code snippet:
=============================
Charts.Add
ActiveChart.ChartType = xlSurface
ActiveChart.SetSourceData Source:=Sheets(sheetName).Range
(chartDataRange _
), PlotBy:=xlColumns

ActiveChart.ChartArea.Select

ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection
(1).XValues= "=RAW_ping_output!R5C9:R18C9"

===============================

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
Timeline Chart? ckrogers Charts and Charting in Excel 3 March 17th 05 09:20 PM
Problem adding Series XValues to Chart using VBA Sean Curry Charts and Charting in Excel 0 March 14th 05 12:18 AM
Problem with xlusrgal.xls file Alfred S C Lee Charts and Charting in Excel 2 December 29th 04 05:54 PM
Impedding/Overlaying Charts Phil Hageman Charts and Charting in Excel 4 December 17th 04 07:25 PM
pivot table multi line chart souris Charts and Charting in Excel 2 December 7th 04 03:56 AM


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