One of my protected worksheets has an embedded line chart, as well as button-activated macros that allow users (most in Excel ‘07 or ‘10, some in ‘03) to add or remove the trendline for each of the several data series. I can add a trendline, but would appreciate your suggestions as to how to subsequently remove it.
Successful Add:
With ActiveSheet.ChartObjects(1).Chart.SeriesCollection(7).Trendlines.Add
Unsuccessful Remove attempt:
With ActiveSheet.ChartObjects(1).Chart.SeriesCollection(7).Trendlines.Remove
Results in: Run-Time error '438': Object doesn’t support this property or method.
I’m a novice VBA user working in Excel 2010. Thanks for considering this!
Bookmarks