View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Fredrik Wahlgren Fredrik Wahlgren is offline
external usenet poster
 
Posts: 339
Default Forcing a function to calculate


"Floyd" wrote in message
oups.com...
What is the syntax to force a function to calculate from another sheet?

Function Test()

End Function

Worksheets("Sheet1").Test.Calculate

This won't work, but I think I am getting close.

Thanks in advance.

Floyd



Test is a user defined function, right? You only need to add one line of
code to the function, like this:

Function Test()
Application.Volatile True
End function

"Test" will now be recalculated whenever the sheet is reaclculated.

/Fredrik