VBA CreateTextFile Examples Write a line to text file with New Line late binding Dim fso as Object ts as Object Create the FileSystemObject Set fso CreateObjectScriptingFileSystemObject Create the TextStream Set ts fsoCreateTextFileChellotxt Write 2 lines. Leave the fourth parameter off and the file will be opened as ASCII. If False then ASCII.