Can a workbook be coded to prevent users from using the Tools-Protect Sheet or Protect Workbook menu options?
Can a workbook be coded to prevent users from using the Tools-Protect Sheet or Protect Workbook menu options?
You could try this line (untested)[VBA]CommandBars("Worksheet menu bar").Controls("Tools").Controls("Protection").Enabled = False
[/VBA]
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
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.
If you query is now solved could you mark the thread solved by going to Thread Tools>Mark Thread Solved
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)