PC Review


Reply
Thread Tools Rate Thread

Chart Source Data

 
 
Bill
Guest
Posts: n/a
 
      18th Oct 2006


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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      19th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:#$O$(E-Mail Removed)...
>
>
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pie chart & column chart w/same source data =?Utf-8?B?bWFydHltaQ==?= Microsoft Excel Charting 2 1st May 2007 04:25 PM
How do you link chart source data when you copy the chart? =?Utf-8?B?bWFtYWdpcmw=?= Microsoft Excel Charting 1 8th Dec 2006 02:40 AM
chart with changing data source interactive chart Feketik Microsoft Excel Charting 2 19th Mar 2004 09:26 AM
chart with changing data source interactive chart Feketik Microsoft Excel Charting 0 18th Mar 2004 04:34 PM
Chart Source Data Ranges Changing when Data Sheet updated from text file source. Tekn0 Microsoft Excel Charting 3 8th Jan 2004 04:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 PM.