XL5: Custom Function Doesn't Recalculate with Calculate Method

ID: Q118655

5.00 WINDOWS kbother kbfixlist

The information in this article applies to:

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

Keywords          : kbfixlist
Version           : 5.00
Platform          : WINDOWS

Last Reviewed: November 17, 1998