Ron, great information from your menuid link, 2 questions though
1) will the ID of the control work if a user does have "Always show full
menus" checked
2) do you know if will this work in Excel 2007
Thanks, Mary
"Ron de Bruin" wrote:
Hi Mike
Tip: Never use the name of the controls
If your workbook is used in a non English version your code will blow up
Use the ID of the control
See
http://www.rondebruin.nl/menuid.htm
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Mike H" wrote in message ...
Seems a bit sledghammer/walnut to me but anyway, try this
Sub Disableit()
With Application.CommandBars("Worksheet Menu Bar")
With .Controls("&Tools")
With .Controls("&Protection")
.Controls("Unprotect Sheet...").Enabled = False
End With
End With
End With
End Sub
Mike
"Mary Cullen" wrote:
In my VB code I want to disable the "unprotect sheet" command in
tools/protection. I am trying to avoid password protecting the sheet