By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,062 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

regarding the count of line in text file

P: 11
hi
iam reading text file thru vb 6.0 . now i want 2 count the no of lines in that text file. can anyone give me idea 2 retrieve the no of lines

for reading , i had used the codes,

Open sfil For Input As #nSourceFile
Do While Not EOF(1)
Line Input #1, schunk
loop

regards
vivek
Nov 11 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 1,646
hi
iam reading text file thru vb 6.0 . now i want 2 count the no of lines in that text file. can anyone give me idea 2 retrieve the no of lines

for reading , i had used the codes,

Open sfil For Input As #nSourceFile
Do While Not EOF(1)
Line Input #1, schunk
loop

regards
vivek
Hi. You only need to add a counter in the loop

Open sfil For Input As #nSourceFile
Do While Not EOF(1)
Line Input #1, schunk
lngCounter = lngCounter + 1
loop
Nov 11 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.