I used the code provided by James to count the number of lines in a textfile. Looking at my text file in an advanced "notepad" editor it had 3533 lines. The CountLines procedure counted 5043 lines.
So I looked at the CountLines procedure and put
Line in front of
Input #fileFile, strBuffer (inside the loop)
Now I get the right number of lines. I don't really know why I got more lines using the original code from James, but now I can use the total number of lines to get my progressbar (
John Walkenbach's progressbar actually) to work.