Which code would be more efficient to use, especially going over a network connection (if that makes a difference). If the file is say 100 bytes to 1kB in size?
VB Code:
Open App.Path & "\test.txt" For Output As #1 Print #1, "insert string here" Close #1
or
VB Code:
Dim txtFile As TextStream Set txtFile = fs.OpenTextFile(App.Path & "\test.txt", ForWriting) txtFile.Write "insert string here" txtFile.Close
Also, in this particular app, one copy of the file is saved locally, while the other is saved on a network share. Would copying the file using FSO be quicker or more efficient than opening the file and printing to it?




Reply With Quote