XL97: Macro Command Menubars(xlWorkBook) Is Not Valid

Last reviewed: January 9, 1998
Article ID: Q170448
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

When you run a macro to display the Microsoft Excel 4.0 menu bar, the menu bar does not appear, and no error message is displayed.

CAUSE

This problem occurs when you use the constant xlworkbook to display the Microsoft Excel 4.0 menu bar. This menu bar is no longer available in Microsoft Excel 97.

For additional information about customizing menu bars in Microsoft Excel 97, please see the following article in the Microsoft Knowledge Base:

   Article-ID: Q166755
   TITLE     : XL97: WE1183: "Customizing Menu Bars, Menus, and Menu Items"

STATUS

This behavior is by design of Microsoft Excel 97.

MORE INFORMATION

In Microsoft Excel 97, menu bars and toolbars are referred to as the same programmable object type (a command bar). You can use Visual Basic for Applications to manipulate the built-in command bars in Microsoft Excel 97. Although command bars are recommended over menu bars, the menu bars object is used for backward compatibility with earlier versions of Microsoft Excel.

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.


Additional query words: XL97
Keywords : xlminfo kbcode kbmacro kbprg kbui
Version : Windows:97
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 9, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.