The information in this article applies to:
SYMPTOMSIn Microsoft Excel 98 Macintosh Edition, if you run a Visual Basic for Applications macro that adds a command to a menu or deletes a command from a menu, you may receive the following error message:
CAUSE
This problem occurs when, in the macro command to add or delete the menu
command, you specify a menu command that no longer exists, or is changed in
Microsoft Excel 98 Macintosh Edition.
WORKAROUNDMicrosoft 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.aspTo work around this behavior, use either of the following methods:
-or- However, the following macro works correctly in all versions of Microsoft Excel:
STATUSThis behavior is by design of Microsoft Excel 98 Macintosh Edition. MORE INFORMATIONIn Microsoft Excel, in a Visual Basic macro, you can add a new menu command to a menu by using a line of code similar to the following:
This line of code adds a new menu command, Test, above the "Toolbars..."
menu command on the View menu.
You can also delete a menu command by using a line of code similar to the following:
In each of the lines of code, the menu command "Toolbars..." is referred by
its exact name. In Microsoft Excel 98 Macintosh Edition, the names of some
menu commands are changed. The new names may cause problems if macro code
refers to these menu items by name.
The two lines of code work correctly in earlier versions of Microsoft Excel. However, they do not work correctly in Microsoft Excel 98 Macintosh Edition, because the menu command "Toolbars..." is renamed Toolbars (no ellipsis). The following menu commands are changed in Microsoft Excel 98 Macintosh Edition.
Additional query words: XL98
Keywords : kberrmsg kbdta kbdtacode xlui xlvbahowto xlvbainfo OffVBA xlvbmigrate |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |