Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Disabling Tools/Options setting

Can anyone help me to find the VBA code to disable the Tools/Options setting.
This to avoid that the user of a model can change the original setting of a
model.

Many Thanks
Jeronimo
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Disabling Tools/Options setting

hi
to disable.....
Sub disableoptions()
Dim myControls As CommandBarControls
Dim ctl As CommandBarControl
Set myControls = CommandBars.FindControls _
(Type:=msoControlButton, ID:=522) '522=options
For Each ctl In myControls
ctl.Enabled = True
Next ctl
End Sub

to enable....
change false to true and run code again.

regards
FSt1

"Jeronimo" wrote:

Can anyone help me to find the VBA code to disable the Tools/Options setting.
This to avoid that the user of a model can change the original setting of a
model.

Many Thanks
Jeronimo

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Disabling Tools/Options setting

hi
after thought
see this site for a complete list of control id numbers 2003 and earlier.
not sure about 07
http://support.microsoft.com/kb/213552

regards
FSt1

"FSt1" wrote:

hi
to disable.....
Sub disableoptions()
Dim myControls As CommandBarControls
Dim ctl As CommandBarControl
Set myControls = CommandBars.FindControls _
(Type:=msoControlButton, ID:=522) '522=options
For Each ctl In myControls
ctl.Enabled = True
Next ctl
End Sub

to enable....
change false to true and run code again.

regards
FSt1

"Jeronimo" wrote:

Can anyone help me to find the VBA code to disable the Tools/Options setting.
This to avoid that the user of a model can change the original setting of a
model.

Many Thanks
Jeronimo

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Disabling Tools/Options setting

hi
sorry. i got everything backwards
to disable set ctl.Enabled = false
to enable set ctl.Enabled = True

sorry about that.
regards
FSt1

"FSt1" wrote:

hi
to disable.....
Sub disableoptions()
Dim myControls As CommandBarControls
Dim ctl As CommandBarControl
Set myControls = CommandBars.FindControls _
(Type:=msoControlButton, ID:=522) '522=options
For Each ctl In myControls
ctl.Enabled = True
Next ctl
End Sub

to enable....
change false to true and run code again.

regards
FSt1

"Jeronimo" wrote:

Can anyone help me to find the VBA code to disable the Tools/Options setting.
This to avoid that the user of a model can change the original setting of a
model.

Many Thanks
Jeronimo

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
Options/Tools TWOV Excel Discussion (Misc queries) 1 January 11th 10 05:37 PM
tools options view window options Joe[_14_] Excel Discussion (Misc queries) 1 November 11th 09 04:08 PM
Tools / Options not working. JW Excel Discussion (Misc queries) 0 March 3rd 09 12:50 AM
Tools Options F.C Setting up and Configuration of Excel 1 March 8th 06 12:12 PM
Tools, Options, General Bernard Excel Discussion (Misc queries) 7 August 4th 05 10:17 PM


All times are GMT +1. The time now is 01:23 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"