Question: Protecting workbook structure will prevent a user from deleting sheets. But how could I (using VBA) prevent a user from deleting a *particular* sheet I designate? I've seen examples where an active sheet is prevented from deletion by

```
Set mymenubar = CommandBars.ActiveMenuBar
mymenubar.Controls("Edit").Controls("Delete sheet").Visible = False

```

in its `Worksheet_Activate` event but that of course only works if the sheet is activated.  

Is there a way to prevent a sheet from being deleted whether active or no?  

For clarity: I'm fine with the user deleting some sheets, just not a couple of particular sheets.  

So protecting workbook structure won't work.

Answer: 
I can prevent a sheet from being deleted via the Worksheet\_BeforeDelete Event as follows:

```
Private Sub Worksheet_BeforeDelete()

    Call ThisWorkbook.Protect("password")

    Call MsgBox("This sheet cannot be deleted.", vbExclamation)

End Sub

```

This protects all sheets from being deleted, however if you add some event code on the ThisWorkbook module like the following :

```
Private Sub Workbook_SheetActivate(ByVal Sh As Object)

    Call ThisWorkbook.Unprotect("password")

End Sub

```

I will then be able to delete any other sheet as soon as it is selected.

Bear in mind, you will lose copy and paste functionality between pages due to the page unlocking when it is selected.
The following disables the menu when you right click on tab. This stops the delete option being available.

```
Sub tab_rclick_off()
Application.CommandBars("Ply").Enabled = False
End Sub

```

The following turns the menu back on.

```
Sub tab_rclick_on()
Application.CommandBars("Ply").Enabled = True
End Sub

```

This option is simple, concise, prevents any issues with data entry/editing with protected sheets and can be called from anywhere in code, ie in conjunction with log on permissions can be given to some and not others etc. foremost yourself.