Deleting menu items from a shortcut menu

The following routine removes the Hide menu item from two shortcut menus: the menus that appear when you right-click a row header or a column header.

Sub RemoveHideMenuItem()

CommandBars("Row").Controls("Hide").Delete CommandBars("Column").Controls("Hide").Delete End Sub

To restore these shortcut menus, use this procedure:

Sub ResetHideMenuItem()

CommandBars("Row").Reset CommandBars("Column").Reset End Sub

0 0

Post a comment