View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default How to Refresh VB Functions Automatically in Excel?

Add Application.Volitile at the beginning of the function. Doing this will
force the cells to recalculate every time that the sheet recalculates. Add
this line. Go back to the sheet and hit F9 to recalculate. If
application.volitile is not required as a regular part of the function then
comment it out when you are finished modifying.
--
HTH...

Jim Thomlinson


"Phillip Nolan" wrote:

I can define a Visual Basic function (via Tools - Macro - Visual
Basic Editor) and the function is indeed called for all cells
referencing it the first time that I select "Close and Return to
Microsoft Excel."

The problem is that when I re-edit the same function and "Close and
Return to Microsoft Excel" the cells are not updated automatically.

How can I get Excel to refresh my entire page automatically upon saving
my VB function and returning to Excel?