Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mark
 
Posts: n/a
Default in Execl is it possible to lock/protect the options

In Microsoft Excel is it possible to password protect the options to stop
them being adjusted in a protected worksheet
  #2   Report Post  
Neil
 
Posts: n/a
Default

Mark

If you insert the following VBA line into your project then the 'Options'
menu will not be available:

commandbars("Worksheet Menu
Bar").Controls("Tools").Controls("Options").Enable d=False

If you put this in the OpenWorkbook Event, then as soon as your workbook is
opened the code will run and the options menu will be disabled.
It is of course good practice to also put a similar line into your
CloseWorkbook event code, but change the 'False' statement to true, so that
the option is again available.

If you wish to disable the whole of a particular menu tree, youe could
truncate the line, so to diable the entire 'Tools' menu tree the line would
be:

commandbars("Worksheet Menu Bar").Controls("Tools").Enabled=False

Note - the above code samples are on one continuous line, not two as
displayed on screen.

HTH


Neil
www.nwarwick.co.uk
"Mark" wrote:

In Microsoft Excel is it possible to password protect the options to stop
them being adjusted in a protected worksheet

  #3   Report Post  
Mark
 
Posts: n/a
Default

Neil,
Maybe I'm not entering it correctly in VB...not sure but cannot get it to
work. Can you please expand on the instructions on where to place the line.

Thanks...Mark

"Neil" wrote:

Mark

If you insert the following VBA line into your project then the 'Options'
menu will not be available:

commandbars("Worksheet Menu
Bar").Controls("Tools").Controls("Options").Enable d=False

If you put this in the OpenWorkbook Event, then as soon as your workbook is
opened the code will run and the options menu will be disabled.
It is of course good practice to also put a similar line into your
CloseWorkbook event code, but change the 'False' statement to true, so that
the option is again available.

If you wish to disable the whole of a particular menu tree, youe could
truncate the line, so to diable the entire 'Tools' menu tree the line would
be:

commandbars("Worksheet Menu Bar").Controls("Tools").Enabled=False

Note - the above code samples are on one continuous line, not two as
displayed on screen.

HTH


Neil
www.nwarwick.co.uk
"Mark" wrote:

In Microsoft Excel is it possible to password protect the options to stop
them being adjusted in a protected worksheet

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
Filter option vishu Excel Discussion (Misc queries) 1 February 28th 05 01:36 PM
Change position of move or copy worksheet option in Excel JesseAviles Excel Discussion (Misc queries) 1 February 22nd 05 10:25 PM
No Save As option confuseduser Excel Discussion (Misc queries) 1 January 28th 05 01:06 AM
XML Data menu option -- not listed / available. How do you fix thi meingotham Excel Discussion (Misc queries) 1 January 27th 05 09:46 PM
How to protect Option button in worksheet Julie Excel Worksheet Functions 2 January 4th 05 01:01 AM


All times are GMT +1. The time now is 01:39 AM.

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"