Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Volatile Method [Excel 2003 VBA Language Reference]

Office 2003

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. This method has no effect if it's not inside a user-defined function used to calculate a worksheet cell.

expression .Volatile(Volatile)

expression Required. An expression that returns an Application object.

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.

Function My_Func()
    Application.Volatile
    ' 
    '    Remainder of the function
    ">
End Function
		


Applies to | Application Object


Show:
© 2015 Microsoft