I'm having a problem getting the last line in a TextArea when I "do not" hit the return key. Like:
Text line one (hit return)
text line two (hit rturn)
text line three (- do not hit return -)
Running the following code yields no text (characters) for the last line in the textarea gadget:
Any ideas on whats wrong?
Thanks,
Text line one (hit return)
text line two (hit rturn)
text line three (- do not hit return -)
Running the following code yields no text (characters) for the last line in the textarea gadget:
file=WriteFile(file_req$) tl=TextAreaLen(textarea1,2) For i=0 To tl tx$=TextAreaText$(textarea1,i,1,2) tnl=Len(tx$) For ii=0 To tnl If Mid$(tx$,ii,1)=Chr$(10) Or i=tl If i=tl Then ii=tnl WriteLine file,Mid$(tx$,1,ii-1) ii=tnl EndIf Next Next CloseFile file
Any ideas on whats wrong?
Thanks,