Hi,
I saw this line on a piece of code I printed from this forum.
Can anyone tell me what it does and why it is used and needed?
Cheers
Phil
Hi,
I saw this line on a piece of code I printed from this forum.
Can anyone tell me what it does and why it is used and needed?
Cheers
Phil
Direct from VBA help, which is also available to you
Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet. A nonvolatile function is recalculated only when the input variables change.
It is often used unnecessarily because the coder doesn't pass the effected range as an argument, but hardcodes it in the function. Only really required on functionality that doesn't trigger a recalculation.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber