Disable Menu Items

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Does anyone know how to disable a specific menue item.
For example, when you click on Data in the toolbar, one
of the options that is displayed is Validation. I want to
gray this item out so that a user cannot select it. I
don't want to remove it completely, just gray it out.
 
One way

Sub MenuItem_Disable()
Dim myCmd As Object
Set myCmd = CommandBars("Worksheet menu bar").Controls("Data")
myCmd.Controls("Validation...").Enabled = False
End Sub

Set it to true if you want to use it again
 
Back
Top