The ERR function returns the number of the latest run-time error. Example 2000 IF (ERR = 50) THEN PRINT "DATA FORMAT ERROR"