"converting the number 13 to 10" That's not what happened. CHR$(13)!=the number 13. CHR$(13) got corrected to CHR$(10) because CHR$(13) is a line break character that doesn't break lines.