A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I extract the XValues Formual String



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2009, 05:01 PM posted to microsoft.public.excel.charting
Dan Thompson
external usenet poster
 
Posts: 9
Default How can I extract the XValues Formual String

This is very frustrating I currently have this code

Sub Test()
Dim X
X = ActiveChart.SeriesCollection(1).Formula
Debug.Print X
End Sub

The above code works fine and outputs
=SERIES("MyChart",data!$FK$597:$FK$638,data!$FJ$59 7:$FJ$639,1)
which is what I want however ........

When I try this code

Sub Test()
Dim B
B = ActiveChart.SeriesCollection(1).XValues.Formula
Debug.Print B
End Sub

I get a runtime error 424 Object Requiered

What am I doing wrong Surely there is a method to return the formula string
value of the XValues of a chart series ??

Dan Thompson
  #2  
Old April 22nd, 2009, 11:59 AM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default How can I extract the XValues Formual String

Hi,

Only the series has a formula property. You will need to parse the formula
to get the xvalues part.
John Walkenbach has created a class to do this
http://spreadsheetpage.com/index.php..._chart_series/

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Dan Thompson" wrote in message
...
This is very frustrating I currently have this code

Sub Test()
Dim X
X = ActiveChart.SeriesCollection(1).Formula
Debug.Print X
End Sub

The above code works fine and outputs
=SERIES("MyChart",data!$FK$597:$FK$638,data!$FJ$59 7:$FJ$639,1)
which is what I want however ........

When I try this code

Sub Test()
Dim B
B = ActiveChart.SeriesCollection(1).XValues.Formula
Debug.Print B
End Sub

I get a runtime error 424 Object Requiered

What am I doing wrong Surely there is a method to return the formula
string
value of the XValues of a chart series ??

Dan Thompson


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.