I\'m trying to use Excel VBA to write to a text file. I\'m doing a few of these:
MyFile1 = \"C:\\outputFromExcel1.txt\" fnum1 = FreeFile() Open MyFile1 For
Just a necro solution: I have found the Close #1 method to still leave a truncated file. Instead, or in addition to, use the Application.Quit for Excel to close Excel. This flushes the cache and completes the write to the text file.
Close #1
Application.Quit