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



Hello Again,
I did not get a response the first time I posted this question. The
first time that has happened. Perhaps it is more difficult than I
think.

I would like to find, using VBA, the worksheet containing the data for a
chart - beginnig with the chart being active sheet. Is there an easy
way to do that?

Thanks,

Bill

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Chart Source Data

Hi Bill,

Need to parse a series formula. If all you want is the source worksheet
maybe this (barely tested and likely unreliable in all but 'typical'
scenarios)

Sub test()
Dim sFml As String
Dim sShtName As String
Dim v

sFml = ActiveChart.SeriesCollection(1).Formula
v = Split(sFml, ",")
sShtName = Replace(Left(v(2), InStr(v(2), "!") - 1), "'", "")

MsgBox sShtName

' Split & Replace n/a in xl97
End Sub

For more info on the series formula and infinately more reliable code

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

Regards,
Peter T

"Bill" wrote in message
...


Hello Again,
I did not get a response the first time I posted this question. The
first time that has happened. Perhaps it is more difficult than I
think.

I would like to find, using VBA, the worksheet containing the data for a
chart - beginnig with the chart being active sheet. Is there an easy
way to do that?

Thanks,

Bill

*** Sent via Developersdex http://www.developersdex.com ***



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
Data Validation to range names for Chart Source Data Candyman Charts and Charting in Excel 1 September 3rd 09 07:27 PM
pie chart & column chart w/same source data martymi Charts and Charting in Excel 2 May 1st 07 04:25 PM
Excel chart source data y-values can only accept 7 data pts? progprog Charts and Charting in Excel 3 March 14th 07 01:09 AM
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
How do you link chart source data when you copy the chart? mamagirl Charts and Charting in Excel 1 December 8th 06 02:40 AM


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