The information in this article applies to:
SUMMARY
The process of programmatically changing menus in Microsoft Excel 97 is
different than earlier versions of Microsoft Excel. The biggest change in
Microsoft Excel 97 is that toolbars, menu bars, and shortcut menus are
considered one type of object (called a command bar). Most Visual Basic for
Applications macros that you create in earlier versions of Microsoft Excel
that customize menus and toolbars work in Microsoft Excel 97. However, some
macros may fail. In this case, modify the macro code to work with the new
object type.
ARTICLE-ID: Q159466 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 an Entire Menu BarThe following macro disables the Worksheet menu bar. After you run the following macro, the Worksheet menu bar is not displayed when a worksheet is active.
The following macro re-enables the Worksheet menu bar so that is displayed
when a worksheet is active.
Deleting and Restoring a Menu on a Menu BarThe following macro deletes the Help menu from the Worksheet menu bar.
The following macro restores the Help menu to the Worksheet menu bar.
NOTE: This macro resets the entire Worksheet menu bar back to its default
settings. When you run this macro, all customizations that you made to the
Worksheet menu bar will be lost.
Deleting and Restoring a Menu Command on a MenuThe following macro deletes the Contents And Index menu command on the Help menu.
The following macro restores the Contents And Index menu command on the
Help menu.
Deleting and Restoring a Submenu on a MenuThe following macro deletes the "Microsoft on the Web" submenu on the Help menu.
The following macro restores the "Microsoft on the Web " submenu on the
Help menu.
Deleting and Restoring a Menu Command on a SubmenuThe following macro deletes the Protect Sheet menu command on the Protection submenu (on the Tools menu).
The following macro restores the Protect Sheet menu command on the
Protection submenu (on the Tools menu).
Deleting and Restoring a Menu on a ToolbarThe following macro deletes the Draw menu on the Drawing toolbar.
The following macro restores the Draw menu on the Drawing toolbar.
Deleting and Restoring a Menu Item on a Shortcut MenuThe following macro deletes the Insert Comment menu command on the worksheet cell shortcut menu.
The following macro restores the Insert Comment menu command on the
worksheet cell shortcut menu and restores the separator line that the
previous macro deleted.
REFERENCESFor 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. Additional query words: XL97 8.0 8.00 commandbar menubar
Keywords : kbprg kbualink97 kbdta kbdtacode xlui KbVBA |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |