I 'm currently developing program which I can check the lines of each textbox if it has same length. The code is working properly in few lines like 2000 lines, but when I try to load a textfile which has 50,000 lines, my program is not responding anymore it takes forever. Is there anything you could help me to make it faster? Pls. its the only logic I could think of.
Private Sub LineChecker()
Dim counter As Integer = TextBox1.Lines.Length - 1
Dim intArray(counter) As Integer
Dim iLine, i As Integer
For iLine = 0 To counter - 1
If TextBox1.Lines(iLine).Length <> 534 Then
listbox1.items.add(iLine)
End If
Next iLine
If iLine = TextBox1.Lines.Length Then
MsgBox("Checking lines complete")
End If
End Sub
Any help I will appreciate.
Thanks,
Ruel
This post has been edited by RuleS: 11 October 2008 - 12:34 AM

New Topic/Question
Reply





MultiQuote




|