Applies To
Application Object.
Description
Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells of the worksheet. A non-volatile function is recalculated only when the input variables change. This method has no effect if it is not inside a user-defined function used to calculate a worksheet cell.
Syntax
object.Volatile(volatile)
object
Required. The Application object.
volatile
Optional. If True or omitted, the function is marked as volatile. If False, the function is marked as non-volatile.
Example
This example marks the user-defined function "My_Func" as volatile. The function will be recalculated whenever calculation occurs in any cells on the worksheet where this function appears.
Function My_Func() Application.Volatile ' ' Remainder of the function ' End Function