TextBox control whith property MultiLine=True is limited in 32K.
How can I broken this limit?
For example if I need read un archive .txt to this textBox?
Thanks,
Rogerio
Printable View
TextBox control whith property MultiLine=True is limited in 32K.
How can I broken this limit?
For example if I need read un archive .txt to this textBox?
Thanks,
Rogerio
You can use a rich text box instead, if you don't mind exporting as RTF format.
------------------
Matthew Ralston
E-Mail: [email protected]
ICQ:31422892
Web Sites:The Blue Link My Home Page (Not up at the moment!)
If you use the Text property instead of the TextRTF property it will export as a perfectly good textfile.
This should do the trick.
I haven't tested the code yet but it should work.
Option Explicit
Private Const LINES = 15
Private strA() As String
Private Sub Form_Load()
Dim intN
'Load dynamic string array from large text files.
Open "C:\yourtextfile.txt" For Input As #1 Len = 1024
Do Until EOF(1)
intN = intN + 1
ReDim Preserve strA(intN + LINES)
Line Input #1, strA(intN)
Loop
Close #1
'Set Scrollbar Prop.
With vsbTest
.Min = 1
.Max = intN
.SmallChange = 1
.LargeChange = intN \ 10
End With
End Sub
Private Sub vsbTest_Change()
Dim IntI As Integer
Dim strTmp As String
'Create display string from array elements
For intI = vsbTest.Value To vsbTest.Value + LINES
strTmp = strTmp + atrA(intI) + vbCrLf
Next intI
txtTest.Text = strTmp
End Sub
that should be it..
hope it helps
-Lumin