Reputation: 259
I am doing the clear function. Whenever there is no Chart Object to delete, it pop out an error. Is there a way to make it error free? When it does not have a chart to clear, it just leave it the same as it is.
Sheet6.ChartObjects.Delete
Upvotes: 2
Views: 169
Reputation: 9976
One way is this...
On Error Resume Next
Sheet6.ChartObjects.Delete
On Error GoTo 0
Upvotes: 1