Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default Retrieving Data Range for Chart

All

I have the code working that will let me retrieve the series formula for a
chart but I need the data range for the chart.

For Each xlSheet In xlBook.Worksheets
For Each EChart In xlSheet.ChartObjects
rst!series = EChart.Chart.SeriesCollection(1).Formula
Next EChart
Next xlSheet

Now this works and I can save the information off into a table. What I want
is to save the data range for the chart in a table within MS Access. Can
anyone help with with the correct code to access and save the datarange for
each chart. Once i have that I will modifiy it within Access and then write
it back to the excel chart.

thanks

Terry

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Retrieving Data Range for Chart


Terry,
It gets a little complicated. <g
See what John Walkenbach has to say...
http://j-walk.com/ss/excel/tips/tip83.htm
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Terry"
wrote in message
All
I have the code working that will let me retrieve the series formula for a
chart but I need the data range for the chart.

For Each xlSheet In xlBook.Worksheets
For Each EChart In xlSheet.ChartObjects
rst!series = EChart.Chart.SeriesCollection(1).Formula
Next EChart
Next xlSheet

Now this works and I can save the information off into a table. What I want
is to save the data range for the chart in a table within MS Access. Can
anyone help with with the correct code to access and save the datarange for
each chart. Once i have that I will modifiy it within Access and then write
it back to the excel chart.
thanks
Terry

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Retrieving Data Range for Chart

A chart's data range isn't exposed to VBA. You can get all the series
formulas and piece it together this way, but there are frequently charts
that do not have a defined data range. Make a chart using A1:B10, then copy
the data in D5:E27 and paste it onto the chart. What's the data range?
Excel's Source Data dialog tells you it's too complex to be displayed, and
that's only a two series chart.

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


"Terry" wrote in message
...
All

I have the code working that will let me retrieve the series formula for a
chart but I need the data range for the chart.

For Each xlSheet In xlBook.Worksheets
For Each EChart In xlSheet.ChartObjects
rst!series = EChart.Chart.SeriesCollection(1).Formula
Next EChart
Next xlSheet

Now this works and I can save the information off into a table. What I
want
is to save the data range for the chart in a table within MS Access. Can
anyone help with with the correct code to access and save the datarange
for
each chart. Once i have that I will modifiy it within Access and then
write
it back to the excel chart.

thanks

Terry



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
Retrieving Data: Speed of beating down rows vs retrieving from array? (PeteCresswell) Excel Programming 2 July 9th 07 03:30 PM
Retrieving chart series range data Mitch Excel Programming 2 February 14th 07 12:08 AM
Retrieving range string from named range clapper Excel Programming 4 October 13th 05 03:09 PM
Retrieving the SQL query of the external data range Pavils Jurjans Excel Programming 2 March 23rd 05 06:41 PM
Retrieving Default Chart Type? NooK[_21_] Excel Programming 2 July 1st 04 07:25 AM


All times are GMT +1. The time now is 10:57 PM.

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"