Run-Time error when you use the Range.Calculate method in Excel (292476)



The information in this article applies to:

  • Microsoft Office Excel 2003
  • Microsoft Excel 2002

This article was previously published under Q292476

SYMPTOMS

In Microsoft Excel 2002, when you try to run a Microsoft Visual Basic for Applications (VBA) macro that contains the Range.Calculate method, you may receive the following error message:
Run-time error '1004'

Calculate method of Range class failed

CAUSE

This behavior occurs if the following conditions are true:
  • You use the Range.Calculate method to calculate a range.
  • On the Calculation tab of the Options dialog box:
    • The Manual calculation option is selected.
    • The Iteration check box is selected.
The Range.Calculate method does not function when both the Manual calculation option and the Iteration check box are selected.

WORKAROUND

To work around this issue, turn off iteration or use automatic calculation in Excel. To do this, follow these steps:
  1. Start Excel 2002.
  2. On the Tools menu, click Options.
  3. In the Options dialog box, click the Calculation tab, and then do either of the following:
    • Under Calculation, click Automatic if you want to use automatic calculation.
    • Click to clear the Iteration check box if you want to turn off iteration.
  4. Click OK.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kberrmsg kbnofix kbprb KB292476