View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim May Jim May is offline
external usenet poster
 
Posts: 430
Default Accumulatar Cell

Thanks for your input Mike.
Isn't another piece to this the fact that the OP needs to also know that if
he changes Calculation mode "from Automatic - via Tools, Options to
Manual" - this is going to affect ALL other Excel workbooks!! so, in this
same specific file it would probably be best to create an Workbook_Open
event making the change Calc from Automatic to Manual and also a
Workbook_Close event to reverse setting of Calc from Manual to Automatic.
PLUS - he'll need to remember (all the time the file is open that any other
Workbooks he works with will **AT THE TIME** also have Calc set to MANUAL,,,

Right?
Please clarify anything I've stirred up here, Tks...
Jim


"Mike" wrote in message
...
Shatin wrote:
On a worksheet:


Hello Shatin,
the <Change Event occurs only when cells on the worksheet are changed by
the user
The <Worksheet_Calculate event occurs after the worksheet is
recalculated.
So if you disable automatic calculation, you can use the
<Worksheet_Calculate event to update cell 'D1'
But you have to disable automatic calculation , otherwise values are
double counted.

Private Sub Worksheet_Calculate()
Range("D1").Value = Range("D1").Value + Range("C1").Value
End Sub


Mike, from Luxembourg