DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links