VBA to disable "Delete...." on shortcut menu of worksheet tab?

M

Mary Kathryn

I have a spreadsheet where I don't want users to be able to delete a
worksheet. How do I code it so that the "Delete..." on the shortcut
menu for the worksheet tabs is disabled? I'm thinking that part of the
code is:

Controls("Delete...").enabled=False


but can't figure out the rest.

Thanks for any help!
 
D

Dave Peterson

There's an option to delete sheets under Edit (on the worksheet menubar).

And the user can just drag that tab to another workbook.

Just a warning that there are other ways to delete sheets.

You may want to consider using Tools|Protection|protect workbook and check that
Structure option. The user won't be able to move/delete/insert/rename/copy any
of those worksheets.
 
Top