hi all,
I have posted this problems already, i am posting it again as i have not asked the question. My problem is I have a data around 24320 lines in a txt file. when i am transforming each value and writing it into another text file i am able to write only around 22000, the other values are not writen into the file I am not able to find the solution as I do not know the reason why it is happening so. Please suggest a solution for this problem my code is
//code starts:
Dim abArray()
Dim t As Long
Dim x
count = 0
fName = "data\" & "TT1" & ".TXT"
Open fileN For Input As #3
On Error GoTo ErrorHandler
Do While Not EOF(3)
Line Input #3, x
Counter = 0
Open fName For Input As #14
Do While Not EOF(14) ' Outer loop.
'If t = 1790 Then
' MsgBox ("ok")
'End If
Counter = Counter + 1
Line Input #14, y
If x = y Then
ReDim Preserve abArray(t)
abArray(t) = Hex(Counter)
t = t + 1
count = count + 1
Exit Do ' Exit inner loop.
End If
Loop
Close #14
'If count > 30160 Then
' MsgBox ("ok")
'End If
Loop
Close #3
fileNK = file & "1" & ".txt"
Open fileNK For Append As #13
p = 0
For t = LBound(abArray) To UBound(abArray)
p = abArray(t)
g = Len(p)
If g = 1 Then
Print #13, "0" & p
Else
' If t = 22312 Then
'MsgBox ("ok")
'End If
Print #13, abArray(t)
End If
Next t
Close #13
Set pnlX = Form1.StatusBar1.Panels(3)
pnlX = "Generation of Family Keys Complete"
ErrorHandler:
On Error Resume Next
Code Ends//
thankyou