I have a chart on the same page as the source data. The chart has five lines, and the user needs the option to select which lines to show. I would like to show check boxes beside each row of data. The user would be able to hide/unhide each line as needed. I have tried the following statements:
Sub Macro1()
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Hidden = True
End Sub
There are no errors when I compile, but I get an error on the last statement at runtime. Any help would be appreciated. Is there a better way to accomplished this objective
Sub Macro1()
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Hidden = True
End Sub
There are no errors when I compile, but I get an error on the last statement at runtime. Any help would be appreciated. Is there a better way to accomplished this objective
Last edited: