Chart_GetObjectsFromObject does not work when the Chart is output as a Sheet instead of on a Worksheet. The problem is that there is no corresponding ChartObject for the Chart. This breaks the function completely since it expects to return a Collection of ChartObjects.
The best solution to this is likely an intensive refactoring of the usages of the function. Ideally, Chart_GetObjectsFromObject would return the Chart object to work with both types of objects. This means that the users of this code need to deal with the Chart being returned instead of the ChartObject.
Chart_GetObjectsFromObjectdoes not work when theChartis output as aSheetinstead of on aWorksheet. The problem is that there is no correspondingChartObjectfor theChart. This breaks the function completely since it expects to return aCollectionofChartObjects.The best solution to this is likely an intensive refactoring of the usages of the function. Ideally,
Chart_GetObjectsFromObjectwould return theChartobject to work with both types of objects. This means that the users of this code need to deal with theChartbeing returned instead of theChartObject.