Hope someone can help with what should be a simple one.
I'm trying to delete a variable number of charts from a sheet.
I create them through a macro that retrieves data and builds the charts. I then need to delete and re-create them when the user wants to re-run the query with different parameters. There could be none or there could be any number of charts. Just depends on what's been requested.
I've tried SkipVought's tip (09/01/2002):
For Each Chart In ActiveWorkbook.Charts
Charts.Delete
Next
but I need to declare the chart object I think. I've tried a number of other ways, but being fairly new to VBA, I think I'm missing some simple step.
Thanks.
I'm trying to delete a variable number of charts from a sheet.
I create them through a macro that retrieves data and builds the charts. I then need to delete and re-create them when the user wants to re-run the query with different parameters. There could be none or there could be any number of charts. Just depends on what's been requested.
I've tried SkipVought's tip (09/01/2002):
For Each Chart In ActiveWorkbook.Charts
Charts.Delete
Next
but I need to declare the chart object I think. I've tried a number of other ways, but being fairly new to VBA, I think I'm missing some simple step.
Thanks.