467,151 Members | 948 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

regarding the count of line in text file

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
  • viewed: 1896
Share:
1 Reply
1GB
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.

Similar topics

5 posts views Thread by jester.dev | last post: by
22 posts views Thread by Ling Lee | last post: by
MarkoKlacar
reply views Thread by MarkoKlacar | last post: by
3 posts views Thread by waynejr25 | last post: by
16 posts views Thread by lovecreatesbea...@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.