Put tracer messages after each COM call in the UDF, like this:

$rs.update

? "ERROR @ERROR - @SERROR"

Then keep moving the tracer further down until you hit the error.

-Shawn