Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how to modify address of data in chart

Hi,
I've got problem with charts in vba.
I'd like to modifty data in the chart.
For example data of series1 are addressed "=CHF!A1:A5" and I'd like to
change it for "EUR!A1:A5". I've got to read first where the data of series1
are located.

I wanted to do it through:

dim strAddress as string
dim obChart as Chart

....

strAddress=obChart.SeriesCollection(1).Values

but it doesnt work because obChart.SeriesCollection(1).Values returns array.
How to read the address of series1?

Thanks for help
Mariusz


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default how to modify address of data in chart

You can use the Formula property of the series. Jon Peltier has
instructions on his web site:

http://www.peltiertech.com/Excel/Charts/ChgSrsFmla.html

Mariusz wrote:
Hi,
I've got problem with charts in vba.
I'd like to modifty data in the chart.
For example data of series1 are addressed "=CHF!A1:A5" and I'd like to
change it for "EUR!A1:A5". I've got to read first where the data of series1
are located.

I wanted to do it through:

dim strAddress as string
dim obChart as Chart

...

strAddress=obChart.SeriesCollection(1).Values

but it doesnt work because obChart.SeriesCollection(1).Values returns array.
How to read the address of series1?

Thanks for help
Mariusz




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to modify address of data in chart

Hi Mariusz,

Try this ;
strAddress=obChart.SeriesCollection(1).formula

Michel

"Mariusz" wrote:

Hi,
I've got problem with charts in vba.
I'd like to modifty data in the chart.
For example data of series1 are addressed "=CHF!A1:A5" and I'd like to
change it for "EUR!A1:A5". I've got to read first where the data of series1
are located.

I wanted to do it through:

dim strAddress as string
dim obChart as Chart

....

strAddress=obChart.SeriesCollection(1).Values

but it doesnt work because obChart.SeriesCollection(1).Values returns array.
How to read the address of series1?

Thanks for help
Mariusz



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default how to modify address of data in chart

In addition to the other suggestions you have received, you might want to check
A Class Module to Manipulate a Chart SERIES
http://j-walk.com/ss/excel/tips/tip83.htm

"Mariusz" wrote:

Hi,
I've got problem with charts in vba.
I'd like to modifty data in the chart.
For example data of series1 are addressed "=CHF!A1:A5" and I'd like to
change it for "EUR!A1:A5". I've got to read first where the data of series1
are located.

I wanted to do it through:

dim strAddress as string
dim obChart as Chart

....

strAddress=obChart.SeriesCollection(1).Values

but it doesnt work because obChart.SeriesCollection(1).Values returns array.
How to read the address of series1?

Thanks for help
Mariusz



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
How to write a macro to modify an Excel chart raymondvillain Charts and Charting in Excel 4 July 14th 07 04:38 PM
How to return the address of the range of plotted data on an XY scatter chart? Ken Johnson Charts and Charting in Excel 5 July 4th 06 12:40 PM
Help...Need to modify data within a column in a .csv file [email protected] Excel Discussion (Misc queries) 11 October 26th 05 11:23 PM
Help...Need to modify data within a column in a .csv file [email protected] Excel Worksheet Functions 11 October 26th 05 11:23 PM
Excel VBA - Read and modify the chart data range rcatarino Excel Programming 0 April 6th 04 01:19 AM


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