Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Excel Charts

Easier would be to use dynamic defined names to be the source of your data

Insert =Name = Define

Name: XValues
Refersto: =Offset(Sheet1!$A$1,0,0,Count(Sheet1!$A$A),1)

Name: YValues
Refersto: =Offset(Sheet1!$B$1,0,0,Count(Sheet1!$B$B),1)

In the Chart wizard, under data source, for the series specify (or edit this
in the menu when right clicking on the chart)

=WorkbookName.xls!YValues

and for labels
=WorkbookName.xls!XValues

or edit it in the formula bar when selecting the series.

Thus no code needed.

Regards,
Tom Ogilvy



"jNando" wrote in message
...
I have an Excel workbook that has many charts in it. I
would like to create some code that allows me to
automatically manipulate the .Value and .Xvalue of the
active chart's SeriesCollection.
Each month a new data point is added to the chart's source
data and the .Value and .XValue needs to be extended by
one column to the left (the source data is in rows) to
encompass the new data point. Does anyone have an example
of code that could do this?

Thanks,
jNando



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
charts toolbar / charts disappeared Pro Charts and Charting in Excel 0 December 18th 09 01:31 AM
Unable to click on charts & unable to create any new charts Excel Snapclick Charts and Charting in Excel 4 February 1st 09 07:59 PM
link excel charts to web pages and update charts automatically Signguy Charts and Charting in Excel 1 April 22nd 08 08:29 PM
Charts - How to have multiple charts share a legend. Sean Charts and Charting in Excel 2 November 20th 07 04:49 AM
Matching the colors Column Charts and Pie Charts RohanSewgobind Charts and Charting in Excel 3 April 21st 06 09:35 PM


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