Results 1 to 5 of 5

Thread: Writing to the next line

  1. #1

    Thread Starter
    Addicted Member icemanmt78's Avatar
    Join Date
    May 2000
    Posts
    142

    Angry

    Help,

    I have opened a file ( partially populated ) for append and then i am writing some new data to this file.

    How do i make sure that the data I am writing gets put onto the next line and not over data that already exists in the file?????

    At the moment every time i call the write function it overwrites the data that already exists.


    Any ideas?

    Regards

    Mark

  2. #2
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    Open filename for append as #1
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  3. #3
    New Member
    Join Date
    Jun 2000
    Posts
    6
    Hail,

    Umm, I have'nt used the Append in a long time. But i'd say do have alook at Help. It probably say that Write might not work with append. Try another way of writing to the file,instead of Write.

    Sorry. Thats all.

    Regards,

    ---------------
    Rowie

  4. #4
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    When you open in append, unless you need to have your test in quotes (which using the Write handle will do), just use print. The plus with using print is that it does not overwrite the current info. Use something like this:

    Code:
    Dim FF as long
    
    FF=FreeFile
    
    Open "c:\myFile.txt" for Append as FF
        Print #FF, stufftosave
    Close FF
    Hope this helps.

  5. #5

    Thread Starter
    Addicted Member icemanmt78's Avatar
    Join Date
    May 2000
    Posts
    142

    Talking Thanks

    Sussed it

    Cheers

    The Iceman

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