PC Review


Reply
Thread Tools Rate Thread

Calculate Range run-time error 1004

 
 
Jochem
Guest
Posts: n/a
 
      14th Nov 2009
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?
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      14th Nov 2009
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.
--
Gary''s Student - gsnu200908


"Jochem" wrote:

> 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?

 
Reply With Quote
 
JoHar
Guest
Posts: n/a
 
      14th Nov 2009
Even when I do the following:

WorkSheets(1).Rows(1).Calculate

I get the same error. Any idears?

"Gary''s Student" wrote:

> 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.
> --
> Gary''s Student - gsnu200908
>
>
> "Jochem" wrote:
>
> > 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?

 
Reply With Quote
 
Per Jessen
Guest
Posts: n/a
 
      14th Nov 2009
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


On 14 Nov., 15:16, JoHar <Jo...@discussions.microsoft.com> wrote:
> Even when I do the following:
>
> WorkSheets(1).Rows(1).Calculate
>
> I get the same error. Any idears?
>
>
>
> "Gary''s Student" wrote:
> > 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 ActiveSheetis
> > really a worksheet and something else, like a chart.
> > --
> > Gary''s Student - gsnu200908

>
> > "Jochem" wrote:

>
> > > 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?- Skjul tekst i anførselstegn -

>
> - Vis tekst i anførselstegn -


 
Reply With Quote
 
Charles Williams
Guest
Posts: n/a
 
      14th Nov 2009
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

"Jochem" <(E-Mail Removed)> wrote in message
news:C53B798B-A409-4496-A1D9-(E-Mail Removed)...
>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?
>



 
Reply With Quote
 
JoHar
Guest
Posts: n/a
 
      16th Nov 2009
Charles,

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

Thanks!!!!!

"Charles Williams" wrote:

> 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
>
> "Jochem" <(E-Mail Removed)> wrote in message
> news:C53B798B-A409-4496-A1D9-(E-Mail Removed)...
> >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?
> >

>
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error 1004 with Range Sam Kuo Microsoft Excel Programming 4 7th Mar 2008 01:03 AM
Error 1004: Calculate Method of Range Class Failed =?Utf-8?B?RGFuIFdpbnRlcnRvbg==?= Microsoft Excel Programming 6 13th Oct 2005 10:19 PM
Re: Run-time error '1004' on Range.Activate =?Utf-8?B?RG9uIFJvdXNl?= Microsoft Excel Programming 0 25th Aug 2005 03:34 PM
Run-time 1004 error on range select Morgan Microsoft Excel Programming 3 11th Nov 2003 11:44 PM
Range.cells.calculate give error 1004 only in XP Stef Microsoft Excel Programming 1 31st Oct 2003 02:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:39 PM.