Disable File, Edit, View, etc. command bars

  • Thread starter Thread starter Danny
  • Start date Start date
D

Danny

Is there away to disable ONE or MORE of the File, Edit,
View, Insert, Format, Tolls, Data, Window and Help command
bars?

Thanks
 
Hi Danny

For all

Sub test()
Dim myCmd As Object
On Error Resume Next
Set myCmd = CommandBars("Worksheet menu bar")
For a = 1 To myCmd.Controls.Count
myCmd.Controls(a).Enabled = False
Next
End Sub


For one
Application.CommandBars("Worksheet menu bar").Controls("File").Enabled = False

Whole menubar
Application.CommandBars("Worksheet menu bar").Enabled = False
 
Hi Ron,

Thanks a lot, AGAIN!

Regards,

Danny
-----Original Message-----
Hi Danny

For all

Sub test()
Dim myCmd As Object
On Error Resume Next
Set myCmd = CommandBars("Worksheet menu bar")
For a = 1 To myCmd.Controls.Count
myCmd.Controls(a).Enabled = False
Next
End Sub


For one
Application.CommandBars("Worksheet menu bar").Controls ("File").Enabled = False

Whole menubar
Application.CommandBars("Worksheet menu bar").Enabled = False


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)




"Danny" <[email protected]> wrote in
message news:[email protected]...
 
Back
Top