Sometimes depending on the version of KiXtart, the error actually occurs on the previous line. In which case you might try removing the "$RetVal = " and check @error.
_________________________
Home page: http://www.kixhelp.com/hb/