byronwall / bUTL

Excel add-in with helpers for charting, formatting, and general pain points
http://byroni.us/bUTL
MIT License
16 stars 3 forks source link

Chart_GetObjectsFromObject should support Charts as Sheets #43

Open byronwall opened 8 years ago

byronwall commented 8 years ago

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.