Syntax

expression.Volatile(Volatile)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Volatile Optional Variant True to mark the function as volatile. False to mark the function as nonvolatile. The default value is True

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 on which this function appears.

Visual Basic for Applications
Function My_Func() Application.Volatile ' ' Remainder of the function "> End Function
Mark user-defined method for recalculation on change? Recalc this function whenever a change occurs? Volatile volatile method

See also: