Excel: Attaching Text to a Chart Through a Macro

Last reviewed: November 29, 1994
Article ID: Q58424
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 2.x, 3.0, 4.0

SUMMARY

To attach text to a chart through a macro, the ATTACH.TEXT command function should be followed by a FORMULA command function. This sequence allows the default text that is inserted when using the ATTACH.TEXT command to be changed.

For example, to insert the words "My Chart" as the title of a chart, use the following commands:

   =ATTACH.TEXT(1)
   =FORMULA("My Chart")

To allow the user to input the desired text for the value axis of a chart, use the following commands:

   =ATTACH.TEXT(2)
   =FORMULA(INPUT("Enter the text to appear on the value axis:",2))

REFERENCES

For more information on the ATTACH.TEXT and FORMULA commands, see pages 29-30 and 168-169 in the "Microsoft Excel Function Reference," version 4.0. If you are using version 3.0, see pages 18-19 and 89-90 in the "Microsoft Excel Function Reference" version 3.0 manual. If you are using Excel 2.20, see pages 198-199 and 224-225, respectively, in the "Microsoft Excel Functions and Macros" version 2.2 manual.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 3.00 4.00


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