Vba Protect Sheet From Delete. Due to the amount of codes and subs of the actual workbook, the "traditional" protect/unprotect. They may be modified by VBA or by the user, but never deleted.
True allows the user to delete columns on the protected worksheet. Tips: If you want to allow the deletion of the worksheets, just need to remove the workbook protection using the Unprotect Workbook If you just want to protect one or some particular sheets from being deleted, use the VBA editor to do that. This tutorial explains how to use VBA to protect worksheet with password.
I've seen examples where an active sheet is prevented from For clarity: I'm fine with the user deleting some sheets, just not a couple of particular sheets.
Protect Sheet - Allow VBA to Make Changes.
But if you would like to protect all sheets from deletion, this method also works. Also the code to protect and unprotect all my sheets seem to have a problem, because the sheets are not protected. Since you are deleting sheets using VBA, you know what you are doing.