Microsoft KB Archive/133334

{|
 * width="100%"|

MXL5: "Not Enough Memory" Using SHOW.BAR Function in Macro

 * }

-

The information in this article applies to:


 * Microsoft Excel for the Macintosh, versions 5.0, 5.0a

-

SYMPTOMS
In Microsoft Excel for the Macintosh, version 5.0, when you use the SHOW.BAR function in a macro, you may receive the following error message

Not enough memory.

Continue without Undo?

followed by the following error message:

Not enough memory

When you click OK in these error messages, the active macro sheet may not be redrawn completely.

CAUSE
This behavior occurs when you use the SHOW.BAR function in a Microsoft Excel version 4.0 Macro sheet with a bar_num argument value of 7, 8, or 9.

The SHOW.BAR function displays the menu bar specified by the bar_num argument. The bar_num argument values 7-9 are reserved for shortcut menus and are not valid values to use with the SHOW.BAR function.

Although these are not valid values for the bar_num argument, you should not receive a "Not enough memory" error message when you use the SHOW.BAR function with these values. When you run a macro in Microsoft Excel for Windows that contains the function SHOW.BAR with a bar_num argument value of 7, 8, or 9, a macro error is returned as expected.

WORKAROUND
To avoid this problem, use the SHOW.BAR function with valid argument values, such as 1-6 and 10-12. For more information about the context for using these arguments, see the SHOW.BAR topic in Microsoft Excel Macro Functions Help.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel 98 Macintosh Edition.