Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Challenge with Automatic Calculation

My piece of code runs under manual calculation mode. When it is done I want
the whole lot to be recalculated.
Towards the end of my code I have the following statements:

With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With

End Sub

The problem:
Watching the worksheet status in the right bottom corner of the screen I see
that the lot is calculated twice (the "Calculating xx%" runs from 0 to 100
twice) which is a bit of a nuisance since it takes quite a while.
How can I get it to calculate only once?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Challenge with Automatic Calculation

Rather than go to Automatic, try:

Sub MichaelR()
Application.CalculateFullRebuild
End Sub

--
Gary''s Student - gsnu200857


"Michael R" wrote:

My piece of code runs under manual calculation mode. When it is done I want
the whole lot to be recalculated.
Towards the end of my code I have the following statements:

With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With

End Sub

The problem:
Watching the worksheet status in the right bottom corner of the screen I see
that the lot is calculated twice (the "Calculating xx%" runs from 0 to 100
twice) which is a bit of a nuisance since it takes quite a while.
How can I get it to calculate only once?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Challenge with Automatic Calculation

Thank you very much, works fine - and calculates only once.

"Gary''s Student" wrote:

Rather than go to Automatic, try:

Sub MichaelR()
Application.CalculateFullRebuild
End Sub

--
Gary''s Student - gsnu200857


"Michael R" wrote:

My piece of code runs under manual calculation mode. When it is done I want
the whole lot to be recalculated.
Towards the end of my code I have the following statements:

With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With

End Sub

The problem:
Watching the worksheet status in the right bottom corner of the screen I see
that the lot is calculated twice (the "Calculating xx%" runs from 0 to 100
twice) which is a bit of a nuisance since it takes quite a while.
How can I get it to calculate only once?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Challenge with Automatic Calculation


Unfortunately I have now discovered a challenge with the ...Rebuild:

When I save, close and re-open the workbook I get a "Excel found unreadable
content in Workbook". When I agree to having it repaired some of my formulae
are being replaced by "=#N/A". The odd thing is that the original (identical)
formulae above and below the "problem-cell" are OK. The workbook is too large
to do a comprehensive check whether these N/As are the only resulting issues.

I have tried to narrow the problem down and found that it appears to be the
Rebuild which results in this situation. I have tried
"Application.CalculateFull" and "Application.Calculate" and neither of them
creates the problem.

Do you have any clue what the root-cause might be - and how to fix it?

Thanks for your help,
Michael

"Gary''s Student" wrote:

Rather than go to Automatic, try:

Sub MichaelR()
Application.CalculateFullRebuild
End Sub

--
Gary''s Student - gsnu200857


"Michael R" wrote:

My piece of code runs under manual calculation mode. When it is done I want
the whole lot to be recalculated.
Towards the end of my code I have the following statements:

With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With

End Sub

The problem:
Watching the worksheet status in the right bottom corner of the screen I see
that the lot is calculated twice (the "Calculating xx%" runs from 0 to 100
twice) which is a bit of a nuisance since it takes quite a while.
How can I get it to calculate only once?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
*****PLEASE******* FIX AUTOMATIC CALCULATION msnyc07 Excel Worksheet Functions 1 February 15th 10 11:40 PM
Automatic calculation BeckyW Excel Worksheet Functions 1 October 8th 07 09:59 AM
Automatic Calculation pkbravo[_2_] Excel Programming 0 April 4th 06 03:12 PM
Automatic Calculation peacelittleone Excel Discussion (Misc queries) 6 March 15th 06 06:58 PM
range.calculation with UDF not working when calculation is set to automatic Brian Murphy Excel Programming 5 October 14th 03 07:02 PM


All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"