Excel: GET.CHART.ITEM() Returns Error with ECHO(FALSE)

Last reviewed: November 30, 1994
Article ID: Q63430
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 2.2, 3.0, 4.0
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a
  • Microsoft Excel for OS/2, versions 2.x, 3.0

SUMMARY

In Microsoft Excel, the GET.CHART.ITEM() macro function may return a macro error when it is preceded by the ECHO(FALSE) command. To prevent this macro error from occurring, insert the ECHO(TRUE) command directly before the GET.CHART.ITEM() function.

This behavior is by design.

MORE INFORMATION

The ECHO(FALSE) command will make your macro run faster by suppressing screen refreshes. However, if you use this command along with a command that activates or changes the existing chart, your macro may halt and display the following error message

   Macro error at cell: <cell_ref>

where <cell_ref> is the cell containing the GET.CHART.ITEM() command.

This problem will occur when one of the following is true:

  • Your macro makes changes in the chart that will not be shown on the screen due to the ECHO(FALSE) command. (For example, if the item specified in the GET.CHART.ITEM() statement has been moved or deleted.)

    -or-

  • Your macro activates the chart after executing the ECHO(FALSE) command, and you specify "Axis n" for the item_text argument (or in the case of a 3-D chart you specify "Floor", "Walls" or "Corners").

    NOTE: Most of the other item_text options will work in this case.

Inserting the ECHO(TRUE) command directly before the GET.CHART.ITEM() command will cause the screen to update properly and the GET.CHART.ITEM() will then function as expected.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.20 3.00 4.00 4.00a 2.10b 2.10c 2.10d


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: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.