Disabling Tools/Options setting

J

Jeronimo

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
 
F

FSt1

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
 
F

FSt1

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

sorry about that.
regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top