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_GetObjectsFromObject
does not work when theChart
is output as aSheet
instead of on aWorksheet
. The problem is that there is no correspondingChartObject
for theChart
. This breaks the function completely since it expects to return aCollection
ofChartObjects
.The best solution to this is likely an intensive refactoring of the usages of the function. Ideally,
Chart_GetObjectsFromObject
would return theChart
object to work with both types of objects. This means that the users of this code need to deal with theChart
being returned instead of theChartObject
.