Deleting Sheets w/o Confirm

  • I want to delete sheets using a macro without getting the sheet confirmation box. The reason is that I have a macro that is run from one book and creates a new book and copies one sheet from the original to the new.
    So, I don't want the standard Sheet1, Sheet2, and Sheet3 in the new book.
    Right now I just have my macro set up to delete these extra sheets, but I get the sheet delete confirmation.
    Is there any way to either not get this confirmation, or to create a new completely blank workbook?

    I don't think this question goes against the forum rules because I don't think this is actual security feature as such. However, if it does, just let me know, and in that case my question is just can you create a new workbook without the standard three blank sheets.


  • Re: Deleting Sheets w/o Confirm

    In your code, before deleting the sheets put in the line
    Then put in a similar line after the deletes with a value of True.

  • Re: Deleting Sheets w/o Confirm

    Works perfectly. Thanks.
    I have another question. Is it possible to create the new workbook and have it have a name already? As opposed to just "Book1"?

    I tied ActiveWorkbook.Name = thisName, but it gave an error saying it couldn't change the read only property.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!