|
-
Mar 2nd, 2004, 09:38 PM
#1
Thread Starter
New Member
Number of Lines
How do you obtain the number of lines that a specified file contains using VB 6?
Thank you
-
Mar 2nd, 2004, 10:01 PM
#2
Hyperactive Member
dim x as long
dim tmpvar as string
x = 0
open specified_file for input as #1
do until eof(1)
line input #1, tmpvar
x = x+1
loop
close #1
msgbox "file contains " & x & " lines."
work out the rest
-
Mar 2nd, 2004, 10:02 PM
#3
Hyperactive Member
i think there might also be an API for that, but I'm not quite sure. Maybe I just confused some other line related task with line count, but this pure vb way works just fine.
-
Mar 2nd, 2004, 10:11 PM
#4
Thread Starter
New Member
Thanks ALOT !
That worked Perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|