Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 110
Default Is it possible to ask a chart which worksheet its data lives on?

Hi All

Is it possible through VBA to ask a chart for the name of the
worksheet where it is sourceing its data?

I have one worksheet with all my charts. Each chart refers to data on
a seperate sheet - one per chart.

I would like to loop through each ActiveSheet.ChartObjects and find
the worksheet where the data lives - I then intend to update it based
on user criteria.

I cannot see how to acheive this through the object model. Is this
possible? I suppose it may not be as a chart may have data from
multiple worksheets.

Thanks for any ideas in advance,
Chrisso

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Is it possible to ask a chart which worksheet its data lives on?

You can parse the series formula of each series to find where its data
resides. John Walkenbach has a class module that does the heavy lifting for
you:

http://www.j-walk.com/ss/excel/tips/tip83.htm

Find the range containing a series' X or Y values, then determine the parent
of that range.

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


"Chrisso" wrote in message
ups.com...
Hi All

Is it possible through VBA to ask a chart for the name of the
worksheet where it is sourceing its data?

I have one worksheet with all my charts. Each chart refers to data on
a seperate sheet - one per chart.

I would like to loop through each ActiveSheet.ChartObjects and find
the worksheet where the data lives - I then intend to update it based
on user criteria.

I cannot see how to acheive this through the object model. Is this
possible? I suppose it may not be as a chart may have data from
multiple worksheets.

Thanks for any ideas in advance,
Chrisso



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
Transferring chart data from one worksheet to another DaddyO Charts and Charting in Excel 1 April 27th 07 01:13 PM
Use detailed data in one worksheet to create summary data as chart source rdemyan Charts and Charting in Excel 0 January 23rd 07 02:18 PM
Moving chart data to the same worksheet hmm Charts and Charting in Excel 0 January 17th 07 12:51 PM
HALF-LIVES FOR A CURVE im_1 Charts and Charting in Excel 2 November 28th 05 08:17 PM
How do i recover data in a worksheet that is still in a chart? Martin63 Excel Discussion (Misc queries) 3 November 23rd 05 02:50 PM


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