I have a form that has a text box that allows multi-line text. When I
read an 80K file into it, only 64K characters are stored and
displayed. However, if I copy from the 80K file using the Windows
clipboard commands and then paste into the text box, all the
characters are stored and displayed.
This is how I read the file into the text box. It works fine until
the file exceeds 64K.
F = FreeFile
Open "tagtmp2.tm p" For Input As F
frmForm1!txtEdi t.Text = Input(LOF(F), F)
Close F
I have tried reading the file with LINE INPUT # into a string or
variant variable and then tried to assign the string to the text box
variable. E.g, txtEdit.Text = MyData and it also gets truncated.
This also happens concatenating character-by-character.
Since pasting into the text box works fine, I am assuming that I
should be able to store 2^32 characters into the txtEdit.Text string
as defined for VB for a varying string. The fact that only 2^16
characters are stored means that the text box is being interpreted as
a fixed string which has this smaller limit.
Does anybody know how to do this?
Thanks,
xyz
Comment