The Chart/ChartObject object model is confusing. I have recorded macros for a chart and the code refers to the ActiveChart. When I tried writing code to go through all the tabs of the workbook, ActiveChart fails on some tabs.

I have since learned that there are "Chart Sheets" with one chart which is the active chart. Then there are worksheets with one or more ChartObjects, which may or may not have the focus, and thus may or may not be an ActiveChart.

Because of this distinction, I have to write code for two different situations, Chart vs. ChartObject.

Is there a "best practice" way of iterating through the tabs of the workbook and testing to see if the tab is a Chart Sheet or a Worksheet with one or more Chart Objects?

Thanks,

Tom