Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to write a macro to modify an Excel chart | Charts and Charting in Excel | |||
How to return the address of the range of plotted data on an XY scatter chart? | Charts and Charting in Excel | |||
Help...Need to modify data within a column in a .csv file | Excel Discussion (Misc queries) | |||
Help...Need to modify data within a column in a .csv file | Excel Worksheet Functions | |||
Excel VBA - Read and modify the chart data range | Excel Programming |