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

Create a DeleteAllCharts Sub #36

Closed byronwall closed 9 years ago

byronwall commented 9 years ago

This is called several times in the charting code:

    If MsgBox("Delete all charts?", vbYesNo) = vbYes Then
        Application.ScreenUpdating = False
        Dim cht_obj As ChartObject
        For Each cht_obj In ActiveSheet.ChartObjects
            cht_obj.Delete
        Next cht_obj

        Application.ScreenUpdating = True

    End If

Would be better if this was put into its own Sub to be consistent and simplify code.

byronwall commented 9 years ago

This has been added and the handful of places where it was used before have been replaced.