Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Disable Tools, Protect, Protect Workbook

Within a macro I am using

..CommandBars("Tools").Controls("Protection").Enab led = 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can protect worksheet then workbook but not Protect and Share in code [email protected] Excel Programming 7 January 16th 17 07:01 AM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Disable Tools Protection Protect Sheet for all users but one Win XP Excel Discussion (Misc queries) 6 January 17th 06 10:46 PM
No password protect workbook box in Tools>Options>General MS Excel Discussion (Misc queries) 2 July 16th 05 06:34 AM
Disable/Protect Cells based on If bforster1[_15_] Excel Programming 1 September 29th 04 04:36 PM


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"