Excel Vba Disable Delete Worksheet. When you attempt to delete a worksheet, Excel will ask you to confirm your action: You can disable these prompts (alerts) by toggling DisplayAlerts If you attempt to delete a worksheet that does not exist, VBA will generate an error. In my excel worksheet I don't want user to delete and insert row or columns (right click/delete/insert) How could I take out that functionality from.
But when you want to delete rows using more sophisticated methods you have to use VBA.
When you delete a Worksheet object, this method displays a dialog box that prompts the user to confirm the deletion.
For example, I have a complex WorkSheet where functionality is likely to be affected by some user actions like "Insert or Delete Rows/Columns/Cells". I can help with disallow a user to insert a new sheet but I am not smart enough to come up with a solution for disallow a user to delete a worksheet. This Excel VBA macro allows us to delete hidden worksheets from an active workbook.







