View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Disable Tools, Protect, Protect Workbook

Try this Paul

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=894, Recursive:=True).Enabled = False


More info you can find here
http://www.rondebruin.com/menuid.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Paul Moles" wrote in message ...
Within a macro I am using

.CommandBars("Tools").Controls("Protection").Enabl ed = False

However this disables the entire Tools, Protection menu item.

I only want to disable Tools, Protection, Protect Workbook,

This because the workbook is password protected by macro when it is closed
and a user, users password protecting the workbook mid session is causing
problems.

Users need access to Tools Protection Unprotect Sheet during session.

Many Thanks

Paul Moles