The eof function is not working
1. dim cnt as int
2.
3. Open "file" For Input As #1
4. x = 0
5. Do Until (EOF(1))
6. cnt = cnt + 1
7. ReDim reportstring(x + 1, 4)
8. DoEvents
9. Loop
10. Close #1
this snipit of code throws error on line 6
cnt = max interger value but there is only 9 lines in the file. Am I doing something wrong? if so please explain!
1. dim cnt as int
2.
3. Open "file" For Input As #1
4. x = 0
5. Do Until (EOF(1))
6. cnt = cnt + 1
7. ReDim reportstring(x + 1, 4)
8. DoEvents
9. Loop
10. Close #1
this snipit of code throws error on line 6
cnt = max interger value but there is only 9 lines in the file. Am I doing something wrong? if so please explain!