VBA Count number of series in a chartObject

后端 未结 2 549
忘了有多久
忘了有多久 2021-01-21 18:54

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

2条回答
  •  情歌与酒
    2021-01-21 19:42

    You need to add in Chart:

    Debug.Print ThisWorkbook.Sheets("Sheet1").ChartObjects(1).Chart.SeriesCollection.Count
    

提交回复
热议问题