Microsoft Knowledge Base |
|
XL5: GET.FORMULA Doesn't Return Series Formula After CLEAR(2) |
|
|
Last reviewed: September 12, 1996
Article ID: Q118880 |
|
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, if you use the CLEAR(2) function to clear the formatting on a chart, after you use the ECHO() function to keep the screen from updating, the GET.FORMULA() function does not return the series formula on a chart.
CAUSEThe GET.FORMULA function returns an empty string instead of a chart series formula if you use this function immediately after the CLEAR(2) function, while screen updating is turned off. This behavior occurs because when you use the ECHO(FALSE) function to turn off screen updating, and then use the CLEAR(2) function, the screen is prevented from updating and formatting the chart again. A formula string cannot be returned for the chart series unless the chart is formatted. Note that this is not a problem in Microsoft Excel version 4.0.
WORKAROUNDTo avoid this behavior when you use the GET.FORMULA() function with a chart series, turn screen updating on before you use the GET.FORMULA() function after using the CLEAR(2) function as in the following example: Microsoft provides macro examples for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This macro is provided as is and Microsoft in no way guaranties that the following code can be used in all situations and will not support modifications of the code to suit specific customer requirements.
=CLEAR(2)
=ECHO(TRUE)
=ECHO(FALSE)
=GET.FORMULA("S1")
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCESFor more information about CLEAR, choose the Search button in Microsoft Excel Macro Functions Help and type:
CLEAR function |
|
KBCategory: kbprg
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |