i need to open a file as a string...but the file is > 2 mil characters...is there a way i can open 1 line at a time
the code below works for small files...i just need to return 1 line as string at a time....any help will be greatly appreciated..thanks
keith
Private Sub Command2_Click()
datstring = OpenTextFile("dat3.dat"
getstring1$ = datstring
Text1.Text = Str(FileLen("dat3.dat"
)
Do
On Error GoTo errorhandler
tempstring$ = InStr(getstring1$, "/TN"
If tempstring$ = "0" Then
Exit Do
End If
getstring1$ = Mid(getstring1$, InStr(getstring1$, "/TN"
+ 6)
getstring2$ = getstring2$ & Left(getstring1$, 12) & "|"
Loop
errorhandler:
Call SaveTextFile("test.txt", getstring2$)
MsgBox "DONE"
End Sub
the code below works for small files...i just need to return 1 line as string at a time....any help will be greatly appreciated..thanks
keith
Private Sub Command2_Click()
datstring = OpenTextFile("dat3.dat"
getstring1$ = datstring
Text1.Text = Str(FileLen("dat3.dat"
Do
On Error GoTo errorhandler
tempstring$ = InStr(getstring1$, "/TN"
If tempstring$ = "0" Then
Exit Do
End If
getstring1$ = Mid(getstring1$, InStr(getstring1$, "/TN"
getstring2$ = getstring2$ & Left(getstring1$, 12) & "|"
Loop
errorhandler:
Call SaveTextFile("test.txt", getstring2$)
MsgBox "DONE"
End Sub