byronwall/bUTL

Create a DeleteAllCharts Sub

Closed this issue · 1 comments

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.

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