Calculate Range run-time error 1004

J

Jochem

I get a run-time error 1004 when executing the VBA statement:

ActiveSheet.Rows(1).Calculate

Calculation setting is on xlManual. This is needed because the sheet
contains many formulas and full calculation takes to much time.

What can I do to solve this error?
 
G

Gary''s Student

There is nothing wrong with your code. If the calculation mode is Manual and
both A1 aand A2 contain:

=NOW()

Your code correctly updates only A1. Just make sure that ActiveSheet is
really a worksheet and something else, like a chart.
 
J

JoHar

Even when I do the following:

WorkSheets(1).Rows(1).Calculate

I get the same error. Any idears?
 
P

Per Jessen

It is not the line which cause this error. Do you get the error if you
calculate the entire worksheet.

Do you have any event code in the worksheet?

What is the error description?

Regards,
Per
 
C

Charles Williams

Maybe you have one of these problems?

Range Calculate will fail in Excel 2002/2003 if any of these conditions is
true:

a.. Calculation is set to Manual and Iteration is enabled.
b.. The range being calculated contains a complete circular reference
chain of formulae (you get an error message with Excel 2002 SP3 and later)
c.. The range being calculated partially intersects a multi-cell array
formula.
d.. The Range.Calculate or the Selection.Calculate Methods Fail After You
Update Links to a Dynamic Data Exchange (DDE) Server.
see MSKB 823338
e.. re-entrant calculation is not allowed: you cannot call Range.Calculate
whilst a calculation is in progress
f.. range.calculate will fail if multiple sheets are selected
If the range you calculate includes a multi-cell array formula and you
subsequently recalculate, the cells in the multi-cell array formula will be
individually calculated.


Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 
J

JoHar

Charles,

The problem has been solved. Iterations was still on. Setting this off
solved the error.

Thanks!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top