The file is an EDI transaction and is generated from other software. When the file was sent to a company we do business with they said that they had a problem with the spaces towards the end of the file. They want nulls after the last tilde (~) to the end of the file. So I created Visual Basic code to go to the end of the file, find the last tilde, determine start and end positions and use the MID statement to write nulls after the tilde to the end. I tested the logic by seeing if I could write anything to that area (i.e., the letter M) and that worked. Then I tried to value the area with nulls and was unsuccessful. How does VB understand null values? I tried to move vbNull, X'00', HEX'00', &H00, etc. to the area and the end result is still spaces.