...if someone knows a for next loop that will remove all menu items from CommandBars("Worksheet Menu Bar")...(example: "File" or "Edit" menu when clicked will have nothing listed in it.)
thanks...rm
To remove the menu bar :-
Application.CommandBars(1).Enabled = False
MenuBars.Add.Activate
To restore it :-
Application.CommandBars(1).Enabled = True
MenuBars(xlWorksheet).Activate
Thank you Petruchio...
Do you know how to keep the menu bar, but remove the items in each menu command (example: "File" is visible, but no commands available within that menu?)
I want to keep the menu bar, but remove all of the menu items...thanks
rm
This will disable all the items on the worksheet menu bar :-
Sub Disable_WorksheetMenuBar()
Dim Mnu, MnuItem
On Error Resume Next
With CommandBars("Worksheet Menu Bar")
For Each Mnu In .Controls
For Each MnuItem In Mnu.Controls
MnuItem.Enabled = False
Next
Next
End With
End Sub
To restore, change False to True.
...... perhaps this is what you are looking for :-
Sub Disable_WorksheetMenuBar()
Dim Mnu
With CommandBars("Worksheet Menu Bar")
For Each Mnu In .Controls
Mnu.Enabled = False
Next
End With
End Sub
THANKS Petruchio...that's what I wanted!!