In a form, add this code for a button (on the form)
Private Sub Command5_Click()
Dim ctl As CommandBarControl
Set ctl = CommandBars("Menu Bar").Controls("&Tools")
ctl.Enabled = False
End Sub
I don't know which item you want to disable but you have to precede it
with &. To get a list of all the items on the menu bar you can use this
code:
Private Sub Command5_Click()
Dim CB As CommandBar, ctl As CommandBarControl
Set CB = CommandBars("Menu Bar")
For Each ctl In CB.controls
Debug.Print ctl.Caption
Next
End Sub
Rich
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!