Change the availability for the shortcut menus

 2000-02-05    Commandbars    0    52

The macro below shows how you can toggle the availability state for the shortcut menus.

Sub ToggleCommandBars()
Dim cbEnabled As Boolean
    cbEnabled = Not CommandBars(25).Enabled
    CommandBars(25).Enabled = cbEnabled ' shortcutmenu for cells
    CommandBars(26).Enabled = cbEnabled ' shortcutmenu for columns
    CommandBars(27).Enabled = cbEnabled ' shortcutmenu for rows
    CommandBars("Toolbar List").Enabled = cbEnabled ' shortcutmenu for toolbars
End Sub
The CommandBar Tools available for download will help you to find the names and ID numbers of the available CommandBars.


Leave a comment:

Your comment will only be published after it has been moderated and found spam free.
Your e-mail address will only be used to display your Gravatar.