Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Functions not automatically updating! 1

Status
Not open for further replies.

caffrinho

MIS
Mar 1, 2002
91
GB
I have written a function to save me some time. I doubt the details of the function are of any real consequence since it actually does what it is supposed to.
My problem with it, however, is that the function returns the correct value when it is first entered but doesn't update when i change the values that it relies on. It's almost as if i have the automatic calculation switched off, but i've checked that.

I have the declared the function public, and is in a module located within the project.

I hope this makes sense to somebody that can help coz it's driving me crazy.
 
Put:
Application.volatile

as the 1st line of your function

If you do not do this, the function will only recalc when the rest of the sheet is forced to do a recalc. If your numbers do not affect anything but the function, there will be no recalc of the sheet and QED the function will not update.
HTH

Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top