I am trying to write data to an output file. However, when I open output.txt to view my data, there is nothing written. Here is the section of my code that is writing to the file. What am I doing wrong, and why is it not writing any data?
Open ("c:output.txt") For Output As #2
For j = 1 To UBound(lines)
str2 = str2 + getField(j, 2) + "|" + getField(j, 4) + vbCrLf
Print #2, str2
frmTest.Text1.Text = str2