Excel: Attaching Text to a Chart Through a Macro

ID: Q58424


The information in this article applies to:


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.

Additional query words: 4.00


Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: March 15, 1999