Disable Menu Items

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.
 
R

Ron de Bruin

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
 

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

Top