I have a spreadsheet with a few user-defined function used in the worksheets. To speed up execution of other routins I need to temporarily disable UDF.
OK, in that case how about having a worksheet cell named "RecalcFlag" then something like:
Function CalcIf(...)
If Range("RecalcFlag").Value = 1 Then
UDF code
Else
CalcIf = Application.Caller.Value
End If
End Function
Then you can set RecalcFlag to 0 whenever you don't want the UDF to recalc, but still show the original value. If you use that you will have to allow circular references (otherwise you get a warning message the first time any cell referenced by the function recalculates). I can't see a way to avoid that at the moment.