Results 1 to 22 of 22

Thread: Text file loop

Hybrid View

  1. #1
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text file loop

    Quote Originally Posted by tiguy
    This loops through 32766 line before i get this error.
    You have hit the max an Integer can hold. Change all of your Integers to Longs.

  2. #2
    Lively Member Agilaz's Avatar
    Join Date
    Jun 2006
    Posts
    98

    Re: Text file loop

    no need to change iInputFile and iOutputFile to Long

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text file loop

    Quote Originally Posted by Agilaz
    no need to change iInputFile and iOutputFile to Long
    I never use Integers for anything out of habit because I have been bitten by this situation one too many times.

    Even if I need to loop through 5 items, I still use a Long.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Location
    Ca
    Posts
    124

    Re: Text file loop

    Hey that did not work. i'm still getting the same error.

    Any help?

  5. #5
    Lively Member Agilaz's Avatar
    Join Date
    Jun 2006
    Posts
    98

    Re: Text file loop

    Quote Originally Posted by Hack
    I never use Integers for anything out of habit because I have been bitten by this situation one too many times.

    Even if I need to loop through 5 items, I still use a Long.
    but freefile() always returns a Integer so there's no need to let VB convert it to Long

    @tiguy

    change all cInt() to cLng()

Posting Permissions

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



Click Here to Expand Forum to Full Width