a simple way to write to a file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: a simple way to write to a file

  1. #1
    Join Date
    Nov 2004
    Posts
    293

    a simple way to write to a file

    In my programs I use the folloing code to read in data from a notebook file into my program.

    Open "P:\corp\14211\For ATransfer\ATMTaddList.txt" For Input As #4
    Do
    i = i + 1
    ReDim Preserve sListOfAllEmailAdd(i) As String
    Line Input #4, sListOfAllEmailAdd(i)
    'Debug.Print sUsersArray(i)
    Loop Until sListOfAllEmailAdd(i) = "<>"
    Close #4


    This works fine and is very easy and simple to use. Now I want to write data to a notebook file and I was wondering if there is a nice and simple way to do that?

  2. #2
    Join Date
    Feb 2009
    Posts
    7
    Sure. The following will write an email to the end of the text file


    Open "P:\corp\14211\For ATransfer\ATMTaddList.txt" For Append As #1
    Print #1, "Emailaddress@domain.co.uk"
    Close #1


    Hope this helps

    Debs

  3. #3
    Join Date
    Nov 2004
    Posts
    293
    This works great. Just what I needed.

    Thanks

Similar Threads

  1. Replies: 4
    Last Post: 08-28-2008, 05:42 PM
  2. Replies: 1
    Last Post: 04-27-2008, 05:04 AM
  3. Simple question about NE File Format
    By Vice25 in forum C++
    Replies: 2
    Last Post: 04-30-2007, 07:22 AM
  4. Replies: 1
    Last Post: 02-14-2006, 07:04 AM
  5. Replies: 0
    Last Post: 02-12-2006, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center