View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Charles Williams Charles Williams is offline
external usenet poster
 
Posts: 968
Default Causing all calculated cells to refresh...

Application.calculatefull would be more efficient. There is no need to
rebuild the dependency tree.

or you could consider making your functions volatile (Application.Volatile).
Volatile functions are recalculated at each calculation even if their input
arguments do not change.

Charles
______________________
Decision Models
The Excel Calculation Site
www.DecisionModels.com

"faustino Dina" wrote in message
...
It works:
Application.Worksheets(1).Range("B1").Calculate 'To recalculate a
specific range
Application.CalculateFullRebuild 'To
recalculate all the document


"faustino Dina" wrote in message
...
Thanks for your replay.

Assuming refresh=recalculate then
If the workbook is in automatic calculation mode then it will

recalculate
when it is opened anyway.
(Tools--Options--calculation)
If it is in Manual node then instead of refreshall use
Application.Calculate


I tryed Application.Calculate but it didn't work as I expect.
The workbook is in Automatic mode. I have some functions in a dll that
display the values extracted from a database into the cells taking as
arguments values from other cells. It works as expected. Whenever I

change
an argument cell, the calculated field calls my dll function and refresh

the
value in the cell. The problem is that when the document is closed, it

saves
the last results from the calculated fields. Then when it is opened

again
it
shows the saved values. It doesn't call the function until I change

manually
the cells that act as argument. But I need all the calculated cell to be
recalculated to rerieve the current values from the database.