XL5: Custom Function Doesn't Recalculate with Calculate Method

Last reviewed: September 12, 1996
Article ID: Q118655
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Excel, if you use the Calculate method to recalculate a custom function in a specified range on a worksheet, and you have the Manual calculation option selected, the function is not recalculated.

CAUSE

This behavior occurs only when you use the Calculate method to recalculate a single cell, or a selection of cells. You specify the single cell or selection of cells by using a Range object, for example by using the Range method or the Rows method of the Worksheet object. When the Manual Calculation option is selected, a custom function within the range specified is not recalculated.

WORKAROUNDS

To calculate a custom function, use any of the following methods:

Microsoft provides examples of Visual Basic procedures 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 Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

Method 1: Calculate the entire sheet by using the Calculate method with the

          Worksheet object, as in the following example:

             Worksheets(1).Calculate

Method 2: Set the Calculation option to Automatic by doing the following:

          a. From the Tools menu, choose Options.

          b. Select the Calculation tab.

          c. Under Calculations, select the Automatic option, and choose
             OK.

          You can then use the Calculate method on a single cell or on a
          range of cells.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.

Note that in Microsoft Excel version 5.0c, the Calculate method does not work to calculate an array formula.

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q130708
   TITLE     : XL5: Array Formula Doesn't Recalculate Using Calculate
               Method

REFERENCES

For more information about the Calculate Method, choose the Search button in Help and type:

   Calculate Method


KBCategory: kbother kbfixlist
KBSubcategory:

Additional reference words: 5.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: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.