Microsoft KB Archive/184092

= OFF98: Reset Method of CommandBars Rebuilds Menu Bar Only =

Article ID: 184092

Article Last Modified on 6/23/2005

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh
 * Microsoft Word 98 for Macintosh
 * Microsoft PowerPoint 98 for Macintosh

-



This article was previously published under Q184092



SYMPTOMS
When you reset a menu on a built-in menu bar by using Microsoft Visual Basic for Applications code, none of the menu items are available.



CAUSE
This problem may occur after you delete a built-in menu from a built-in menu bar, add it back to the built-in menu bar, and then use the Reset method to attempt to restore the built-in menu back to its default settings.



WORKAROUND
To work around this problem, use one of the following methods.

WARNING: Using either of these methods resets all custom menus and menu items on the specified menu bar.

Method 1: Use the Customize Toolbar Dialog Box

 * 1) On the View menu, point to Toolbars, and then click Customize.
 * 2) In the Customize dialog box, click the Toolbars tab.
 * 3) Click the name of the toolbar you want to reset, and then click Reset.
 * 4) Click Close.

Method 2: Use Visual Basic for Applications Code
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements. To use Visual Basic for Applications code, follow these steps:  Press OPTION+F11 to start the Visual Basic Editor. On the View menu, click Immediate Window. In the Immediate window, type the following code, and then press RETURN.

In Microsoft Excel: Application.CommmandBars("Worksheet Menu Bar").Reset In other Microsoft Office programs: Application.CommmandBars("Menu Bar").Reset



NOTE: The name of the CommandBar object varies according to the product and its built-in menu bar.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

