Microsoft KB Archive/58424

{|
 * width="100%"|

Excel: Attaching Text to a Chart Through a Macro

 * }

-

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 &quot;My Chart&quot; as the title of a chart, use the following commands:

  =ATTACH.TEXT(1) =FORMULA(&quot;My Chart&quot;)

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(&quot;Enter the text to appear on the value axis:&quot;,2))