Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Keywords: KB292476, kbprb, kbnofix, kberrmsg

↑ Back to the top

Article Info
Article ID : 292476
Revision : 8
Created on : 1/31/2007
Published on : 1/31/2007
Exists online : False
Views : 268