VBA Count number of series in a chartObject
excel, excel-2010, vba
Solution
You need to add in `Chart`:
Debug.Print ThisWorkbook.Sheets("Sheet1").ChartObjects(1).Chart.SeriesCollection.Count
Problem
I know this seems straightforward but it doesn't seem to work for me. I have a chart on "Sheet1". It is the only chart on the sheet. I want to get the number of series in the chart. So I use: ``` Debug.Print ThisWorkbook.Sheets("Sheet1").ChartObjects(1).SeriesCollection.Count ``` to get the answer in the immediate window. However VBA gives me a "Object doesn't support property or method" error. Any ideas?