Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Saving time on calculate

I have a situation where the calculation takes too long and so I put this in
the ThisWorkbook module "SheetChange" event:

ActiveWorkbook.ActiveSheet.Calculate

This makes the calculation much faster and I am confident everything is ok
becuase all that needed to be calculated was the current sheet but the status
bar now reads...:
"Ready Calculate"
:.... becuase there was not a full calculation done.

Are there any good methods of how to handle this. It is more of a
communications issue to myself of the status of the calculation in the
overall excel system. [Note: I do not want to always be doing a full
calculate becuase of the time it takes but, as an additional note, on the
BeforePrint event I do have a full calculate becuase I cannot take the chance
that something is not fully calculated when printed.]

Thank you for your help,

Steven
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Saving time on calculate

Unless you put this message in yourself, I would asssume that you are in
Manual calculation mode. In this mode you will get this message after
changes.

I would guess that either the routine you are runnin does something to the
sheet that is recognizes as a change, or the recalcualtion done via VBA is
not picked up by the workbook.

A couple of suggestions to try,

make sure your calculate statement is at the very end
In addition to the caluclate statement toggle the calculation on/off like this
Application.Calculation = xlCalculationAutomatic
Application.calcualtion = xlCalculationManual

In testing you code you can use the Application.CalcualtionState property to
help determine what the system is showing for calcualtion status.
--
If this helps, please remember to click yes.


"Steven" wrote:

I have a situation where the calculation takes too long and so I put this in
the ThisWorkbook module "SheetChange" event:

ActiveWorkbook.ActiveSheet.Calculate

This makes the calculation much faster and I am confident everything is ok
becuase all that needed to be calculated was the current sheet but the status
bar now reads...:
"Ready Calculate"
:.... becuase there was not a full calculation done.

Are there any good methods of how to handle this. It is more of a
communications issue to myself of the status of the calculation in the
overall excel system. [Note: I do not want to always be doing a full
calculate becuase of the time it takes but, as an additional note, on the
BeforePrint event I do have a full calculate becuase I cannot take the chance
that something is not fully calculated when printed.]

Thank you for your help,

Steven

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Saving time on calculate

When you do an activesheet.calculate any formulae in other sheets that refer
to the activesheet do not get updated (as well as volatile formulae on the
other sheets), and the cells on the activesheet that were calculated will
also be recalculated at the next calculate.

If an F9 recalculation takes much longer than the ActiveSheet.calculate
(Shift-F9) then either you have a lot of volatile formulae on the other
sheets or the other sheets DO depend on the Activesheet.

If you want to be reminded about the status of the calculation you could put
a message in the status bar after the Sheet.Calculate
Application.StatusBar="Sheet '" & activesheet.name & "' Calculated"

and then Trap F9 using Onkey to do an Application.Calculate and
Application.Statusbar=False to reset the message.


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

"Steven" wrote in message
...
I have a situation where the calculation takes too long and so I put this
in
the ThisWorkbook module "SheetChange" event:

ActiveWorkbook.ActiveSheet.Calculate

This makes the calculation much faster and I am confident everything is ok
becuase all that needed to be calculated was the current sheet but the
status
bar now reads...:
"Ready Calculate"
:.... becuase there was not a full calculation done.

Are there any good methods of how to handle this. It is more of a
communications issue to myself of the status of the calculation in the
overall excel system. [Note: I do not want to always be doing a full
calculate becuase of the time it takes but, as an additional note, on the
BeforePrint event I do have a full calculate becuase I cannot take the
chance
that something is not fully calculated when printed.]

Thank you for your help,

Steven



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
Excel 2007 calculate time between 2 date/time columns Kevo Excel Discussion (Misc queries) 8 April 25th 09 12:02 AM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
Saving a file with time and date at a set time period Mark Dullingham Excel Programming 10 March 3rd 07 12:10 PM
Daylight Saving Time (DST) and calculating time difference. Peter T Excel Programming 3 January 19th 07 10:51 AM
Daylight Saving Time (DST) and calculating time difference. Chip Pearson Excel Programming 1 January 17th 07 03:35 PM


All times are GMT +1. The time now is 03:19 PM.

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

About Us

"It's about Microsoft Excel"