How do I remove the "Delete" option when I right click on sheet tab - HELP HELP HELP

Barryoffshore

Board Regular
Joined
Feb 21, 2005
Messages
73
When right clicking on the sheet tab, I need to know if it is possible to remove the "Delete" from being an option. My workbook is structured to where if a single sheet is deleted, it screws up all my formulas. I tried to just password protect the workbook, but doing that removes the "Rename" function, which I still need. I need someone who is way smarter than I am to please PLEASE HELP ME!!!
 
CharlesH,

I tried doing that just now and it didn't work... I know I must be doing something wrong because it should work. Thank you for trying - I think I'll go pull my hair out now!!! LoL
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Sorry try this code.

Code:
Private Sub Workbook_Open()
Application.CommandBars("Ply").Controls("Delete").Enabled = False
End Sub

I tested it and it worked for me.
 
Upvote 0
CharlesH,

Again, thank you for trying so hard... I must be the dumbest guy on this forum because I can't make it work. I open my workbook, go to the Developer tab at the top, then to Visual Basic, then duoble click on the "ThisWorkbook" and I paste what you sent onto the blank sheet. I save and close Visual Basic, then save and close the workbook. But when I reopen the workbook and see if I can delete a sheet tab, I still can... Like I say, I must be doing something wrong.

Bear
 
Upvote 0
jasonb75,

AWESOME!!! That worked exactly as I needed!!!

CharlesH - You gotta try this!!!

I thank both of you VERY VERY MUCH!!!

Bear
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,849
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top