none
How to delete a complete sheet cells as well as chart on it RRS feed

  • Question

  • Dear all,

    I have an excell sheet which is filled up calculation value and in that sheet a graph is inserted to represent those value.
    What is the way from a macro to delete the whole sheet data and graph object in order to start from blank on each new calculation ?

    The problem I have notice is that each time I insert a graph object in the sheet, it is identify with a different index each time

    Any idea how to clear this up automatically using a macro ?

    Thnaks for help

    regards

    Wednesday, April 17, 2019 6:39 AM

Answers

  • To delete ALL charts on a worksheet:

    ActiveSheet.ChartObjects.Delete

    or

    Worksheets("SheetName").ChartObjects.Delete

    where SheetName is the name of the worksheet.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by wakefun Wednesday, April 17, 2019 12:46 PM
    Wednesday, April 17, 2019 10:48 AM

All replies