Can I disable the "Delete" function in Excel (or password protect.

S

softlygiggles

Several of the worksheets I create for work have users that are very new to
Excel. They keep using Delete instead of clear contents and that messes up
formulas that I have in place. I cannot password protect these sheets (for
the boss for one reason). I would LOVE to be able to remove the option to
delete when they right click, or even have a warning appear asking them to
choose between delete and clear contents.
 
J

Jason Morin

You can disable it when the workbook opens. The second
macro re-enables it. Put both in a standard module (press
Alt+F11, Insert > Module, and paste in the code.

Sub Auto_Open()
CommandBars("Cell").FindControl(ID:=292).Enabled = False
End Sub

Sub Shortcut_RestoreItem()
CommandBars("Cell").Reset
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top