excel vba - VBA-charts: how to read the formula from a chart Series -


how can read formula has been assigned of chart series properties? i.e. when have simple x-y scatter chart, can assign formula name property

activechart.fullseriescollection(1).name = "=sheet2!$d$1" debug.print activechart.fullseriescollection(1).name  ' not print =sheet2!$d$1, value in cell 

the problem is, when read later, returns value of formula, not formula itself.

any ideas?

fullseriescollection excel 2013 not have currently. however, following code displays series formula in excel 2010 , should, believe, work 2013:

sub blah1()     dim cht chartobject      set cht = activesheet.chartobjects(1)     msgbox cht.chart.seriescollection(1).formula end sub 

if chart not embedded chart following equivalent code (for chart sheet) works:

sub blah2()     dim cht chart      set cht = activechart     msgbox cht.seriescollection(1).formula end sub 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -