ADD.COMMAND Fails if You Use Menu Item Name for Position (142360)
The information in this article applies to:
- Microsoft Excel for Windows 95
This article was previously published under Q142360 SYMPTOMS
In Microsoft Excel version 7.0, when you use the Microsoft Excel 4.0 macro
language ADD.COMMAND function, if you use menu item names for the position
argument, this function may fail, and you may receive the following error
message:
Command or menu does not exist.
CAUSE
The Excel 4.0 Macro language ADD.COMMAND function fails if you use non-
existent menu item names for the position argument. Microsoft Excel 7.0
menus are different from menus in previous versions of Microsoft Excel.
RESOLUTION
To work around this problem, you can prevent the ADD.COMMAND function from
failing by doing either of the following:
- Use the position of the index numbers instead of the menu item name for
the position argument, as shown in the example in the "More Information"
section of this article.
-or-
- Leave position arguments empty. When you do so, Microsoft Excel adds the
new menu command to the end of the menu.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
REFERENCES
"Microsoft Excel Function Reference," version 4.0, page 8
XL7
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbProgramming KB142360 |
---|
|