Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Can not set Y Values in XY chart

Hello --

I use the following code to set X and Y values:

g_strRangeSeries = "A2:A82" (calculated in prior code)
strDataXValues = Chr(34) & "=Data!" & g_strRangeSeries & Chr(34)
ActiveChart.SeriesCollection(1).XValues = strDataXValues

This correctly places
={"=Data!A2:A82"}
in
Source Data | Series | X Values:

The problem is with setting Y Values.

g_strRangeYVal = "B2:B82" (calculated in prior code)
strDataValues = Chr(34) & "=Data!" & g_strRangeYVal & Chr(34)
ActiveChart.SeriesCollection(1).Values = strDataValues

This incorrectly places
={0}
in
Source Data | Series | Y Values:

Can someone tell me why my method works for X, but not Y?

Thanks in advance for any info.

Larry Mehl


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Can not set Y Values in XY chart

.... answered in the charting group.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

L Mehl wrote:

Hello --

I use the following code to set X and Y values:

g_strRangeSeries = "A2:A82" (calculated in prior code)
strDataXValues = Chr(34) & "=Data!" & g_strRangeSeries & Chr(34)
ActiveChart.SeriesCollection(1).XValues = strDataXValues

This correctly places
={"=Data!A2:A82"}
in
Source Data | Series | X Values:

The problem is with setting Y Values.

g_strRangeYVal = "B2:B82" (calculated in prior code)
strDataValues = Chr(34) & "=Data!" & g_strRangeYVal & Chr(34)
ActiveChart.SeriesCollection(1).Values = strDataValues

This incorrectly places
={0}
in
Source Data | Series | Y Values:

Can someone tell me why my method works for X, but not Y?

Thanks in advance for any info.

Larry Mehl


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004



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
In Office 2007 can't see chart series values unless chart unprotec Carl Charts and Charting in Excel 0 October 28th 09 03:31 AM
Only chart numerical values, not error values andy Charts and Charting in Excel 2 November 8th 07 10:46 PM
chart from pivot data does not update x-axis bar chart values - bug jason gers Excel Discussion (Misc queries) 0 April 3rd 07 06:34 PM
Troubles with asigning x values and values to a chart [email protected] Excel Discussion (Misc queries) 0 July 31st 06 04:15 PM
Huge differences in chart values screws my bar chart scale up. Sirritys Charts and Charting in Excel 2 June 13th 06 10:33 AM


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