The information in this article applies to:
SUMMARY
This article includes sample Visual Basic for Applications macros that
customize and control shortcut menus using the Commandbar object.
Q159466 XL97: List of ID Numbers for Built-In Command Bar Controls MORE INFORMATIONMicrosoft provides programming examples for illustration only, without
warranty either expressed or implied, including, but not limited to, the
implied warranties of merchantability and/or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language being demonstrated and the tools used to create and debug
procedures. Microsoft Support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to
provide added functionality or construct procedures to meet your specific
needs. If you have limited programming experience, you may want to contact
the Microsoft fee-based consulting line at (800) 936-5200. For more
information about the support options available from Microsoft, please see
the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.asp Deleting and Restoring an Entire ShortCut Menu BarThe following macro example deletes the worksheet cell shortcut menu:
The following macro example restores the worksheet cell shortcut menu:
Deleting and Restoring a Menu on a Shortcut MenuThe following macro example deletes the Cut command on the worksheet cell shortcut menu:
The following macro example restores the Cut command on the worksheet cell
shortcut menu:
NOTE: ID 21 corresponds to the Cut command.
Deleting and Restoring a Submenu on a Shortcut MenuThe following macro example deletes the Formulas submenu on the PivotTable shortcut menu:
NOTE: ID 21 corresponds to the Cut command.The following macro example restores the Formulas submenu on the PivotTable shortcut menu:
NOTE: ID 30254 corresponds to the Formulas submenu.
Deleting and Restoring a Command on SubmenuThe following macro example deletes the Calculated Field command on the Formulas submenu on the PivotTable shortcut menu:
The following macro example restores the Formulas submenu on the PivotTable
shortcut menu:
NOTE: ID 1597 corresponds to the Calculated Field command on the Formulas
submenu.
REFERENCES
For more information about programmatically customizing command bars, click
Microsoft Visual Basic Help on the Help menu in the Visual Basic Editor,
type "Customizing menus," click Search, and then click "Overview of Command
Bars" to go to the topic.
Q120802 Office: How to Add/Remove a Single Office Program or Component Additional query words: XL97 8.00 menu bar menubars
Keywords : kbprg kbdta KbVBA |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |