Consulting

Results 1 to 3 of 3

Thread: Stop reading text file before EOF

  1. #1
    VBAX Regular
    Joined
    May 2008
    Posts
    23
    Location

    Stop reading text file before EOF

    I am trying to read a text file with over 100,000 lines, but i realized that it stopped at line 32,767. Anyone could tell me the reason?

  2. #2
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    257
    Location
    Quote Originally Posted by Yvaine
    I am trying to read a text file with over 100,000 lines, but i realized that it stopped at line 32,767. Anyone could tell me the reason?
    32767 is max size of integer variable.
    Were you using a counter during this read?
    If so, change the data type to double or long.

  3. #3
    VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    In addition to what orange has posted, you need to check for EOF.
    [VBA]
    While Not EOF(#FileNumber)
    'Code for reading
    Wend
    [/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •