CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Adding to files

  1. #1
    Join Date
    May 2001
    Posts
    155

    Adding to files

    I have a text box. It has new properties. Using the file systemobject, It opens a file up. How do I make it add the text to that file without overrighting it??????

    --Ant
    --------------------------------------------------
    Create rollover effects in no time!, visit:
    http://members.fortunecity.com/ants12/rolloverwiz.html
    Or email me:
    [email protected]

  2. #2

    Re: Adding to files

    append data in a file.


    dim fs as new filesytemobject
    dim ts as textstraem
    set ts = fs.opentextfile("c:\myfile.txt",APPEND) 'APPEND->i don't remember enum ...
    ts.put mytextbox 'something like that
    ts.close




    else


    dim a as long
    a=freefile
    open "c:\myfile.txt" for append as #a
    print #a, mytextbox.text
    close #a




    is it your problem?

    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

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

Featured