I have a VBA application in an Excel Workbook. At the end of the sub I need to delete a chart. In old version of Excel (2013), method "delete" of chart sheet works perfectly. In version 2019 now this method is not supported and I can't find anything on Microsoft website.
Could you help me if exist new method to delete chart sheets?
This is the piece of code at the end of sub
For Each sht In Workbooks(Nam).Sheets
If sht.name <> "Config" Then
Workbooks(Nam).Sheets(sht.name).Delete
End If
Next
When is selected the chart sheet I receive this error:
Run-time errore '1004': Error in method Delete of Chart class
Thanks