Add

Application.Volatile

to the start of the UDF.