![]() ![]() StrEquation = s.Trendlines(1).DataLabel.Text 'strEquation = "y = m*x + b" 'THIS WORKS WHEN STEPPING THROUGH, but NOT RUNNING? S.Trendlines(1).DisplayEquation = True 'displays the equation for each new trendline S.Trendlines.Add 'adds a trendline to series (s) 'Debug.Print s.Name 'debug print which series 's' is being manipulated Here is my script that runs on an active chart: ThemeColor = 5 'msoThemeColorAccent enumeration starts at 5įor Each s In ActiveChart.SeriesCollection ![]() Subscript out of range on the line afterEquals = Split(upToX(0), " "). This is a very repeatable error where I can step through all series and extract all equations, or step through the first trendline and then run the rest and the script will break on the second trendline with Run-time error 9. I can extract the trendline equations when stepping through the script using F8, but when I remove breakpoints and run with F5 s.Trendlines(1).DataLabel.Text only returns an empty string to strEquations. I am trying to build a collection of the slopes from each trendline in an active chart.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |