User Defined Functions NOT recalculating User Defined Functions NOT recalculating vba vba

User Defined Functions NOT recalculating

This works:

Sub Force_Recalc()    Cells.Replace What:="=", Replacement:="=", LookAt:=xlPart, SearchOrder _        :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=FalseEnd Sub

Figured it out - not sure why Microsoft has this "feature":

The condition arises when a virgin XLSX that uses an XLAM function is opened / created prior to opening the XLAM. In this case no amount of cajoling will cause the XLSX formulas to bind to and execute those XLAM functions, UNLESS you go into each cell & touch the formula bar & hit ENTER (or, as I discovered, do so en masse via a global replace - in my case all the funcs began w a "k", so globally replacing "k" with "k" fixed the error). The problem does not occur if the XLAM is opened first.

For UDFs who can access to Application instance could use:


MSDN source here