It's to do with record length. If the variable being written is a variable-length string, Put writes a 2-byte descriptor containing the string length and then the variable. The record length specified by the Len clause in the Open statement must be at least 2 bytes greater than the actual length of the string.
You either need to define the variable length or (easier) open the file for Output and use Print #.
[tt]
Open "c:\fred23.txt" For output As #1
Print #1, "1|" & Trim("1984")
Close #1
[/tt]
Rather than using a constant as the file number, check out the FreeFile function
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'