Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21090

how to load big huge txt file in vb 6 also show number of lines

$
0
0
hi sir! i made vb6 project to load list.. using comman dialog
Private Sub Command1_Click()
On Error GoTo errhandler
CommonDialog1.CancelError = True
CommonDialog1.Flags = cdlOFNHideReadOnly + cdlOFNPathMustExist + cdlOFNFileMustExist
CommonDialog1.Filter = "Text Files (*.txt)|*.txt"

CommonDialog1.FileName = ""
CommonDialog1.ShowOpen
dim ddr as string
ddr = CommonDialog1.FileName

Text1.Text = ddr
Open ddr For Input As #1
Do While Not EOF(1)
Line Input #1, ddr
If Not (adr = "") Then
i=i+1
End If
label1.caption="no of line= " & i
Exit Sub
errhandler:
Select Case Err
Case 32755
MsgBox "You cancelled the dialog box"
Case Else
MsgBox "Unexpected error. Err " & Err & " : " & Error
End Select
end sub

this can load 2 crore almost 23 mb file.. but when i load 133 mb file my project stop responding and after some time new message come to close this application.. help me bro.

Viewing all articles
Browse latest Browse all 21090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>