It feels to me as if feof would return true on an empty file... If you prefer it without the Next() change, I'll revert it, and keep only Scan