ERLANDSEN DATA CONSULTING Excel & VBA Tips   Informasjon på norsk / Information in Norwegian

These pages are no longer updated and are only available for archive purposes.

Click here to visit the pages with updated information.

Change the availability for the shortcut menus

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

On the download page for CommandBars you can find the tool CommandBar Tools that will help you to find the names and ID numbers of the available CommandBars.

 

Document last updated 2000-02-05 12:47:00      Printerfriendly version

 

Erlandsen Data Consulting     http://www.erlandsendata.no/   
Excel & VBA Tips   Copyright ©1999-2024    Ole P. Erlandsen   All rights reserved
E-mail Contact Address