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

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.
Propriedades

ID do Artigo: 292476 - Última Revisão: 29 de abr de 2008 - Revisão: 1

Comentários