PDA

View Full Version : Solved: Preventing Workbook & Sheet Protect



pcsparky
02-11-2009, 12:02 PM
Can a workbook be coded to prevent users from using the Tools-Protect Sheet or Protect Workbook menu options?

Simon Lloyd
02-14-2009, 04:53 AM
You could try this line (untested)CommandBars("Worksheet menu bar").Controls("Tools").Controls("Protection").Enabled = False

pcsparky
02-14-2009, 08:37 AM
I managed to find something else similar before the forum crashed and change it a little to this:

Application.CommandBars("Tools").Controls("Protection").Enabled = False

which works fine.

Simon Lloyd
02-14-2009, 01:21 PM
If you query is now solved could you mark the thread solved by going to Thread Tools>Mark Thread Solved