Closed Thread
Results 1 to 6 of 6

Thread: Saving data from a listbox to a txt file!

  1. #1
    pds2ect is offline Newbie
    Join Date
    Sep 2007
    Posts
    5
    Rep Power
    0

    Question Saving data from a listbox to a txt file!

    I am writing an application that requires the user to fill in several fields on diferent forms. The data is stored in a listbox on the final form. I need to be able to save the data into a text file on my HD but am struggling to come up with the right code to do it. Any examples of the code needed would be a great help. I am using Visual Studio 2005.
    Thanks.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    o0TheNerd0o's Avatar
    o0TheNerd0o is offline Learning Programmer
    Join Date
    Sep 2007
    Location
    I.E. So-cal
    Posts
    61
    Rep Power
    0
    I don't know how to do it with VS2005, but I can with VB6. Here is some code in VB6 that might help you out.

    Code:
    Open "c:\temp.txt" For Output As #1
    
        For i = 0 To List1.ListCount - 1
            Print #1, List1.Index(i)
        Next i
    
    Close #1
    Option Explicit

  4. #3
    Join Date
    Jun 2007
    Location
    Kosovo
    Posts
    660
    Rep Power
    23
    and how can you save the data on a text file on my host can someone help me ?

  5. #4
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    You mean using FTP?

  6. #5
    Join Date
    Jun 2007
    Location
    Kosovo
    Posts
    660
    Rep Power
    23
    yes can you help me ?

  7. #6
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    Well try this code:
    Visual Basic Simple FTP Upload

    as you can see it is quite a piece of code and I don't have time to code it my self, so I found this for you. Hope it helps. (You need an OCX, can be downloaded from there)

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. C# ListBox Data Question?
    By nighthawk in forum C# Programming
    Replies: 1
    Last Post: 10-11-2011, 12:42 PM
  2. saving data in a database
    By ployo60 in forum Pascal and Delphi
    Replies: 7
    Last Post: 02-20-2011, 11:44 AM
  3. Saving and Accessing an image file to a Resource file: How?
    By oscarocasla in forum C# Programming
    Replies: 4
    Last Post: 02-08-2011, 09:30 AM
  4. Saving data from "form to a file"
    By ankit in forum PHP Development
    Replies: 8
    Last Post: 02-15-2010, 12:34 AM
  5. Saving Data
    By RGB in forum Java Help
    Replies: 2
    Last Post: 09-25-2008, 01:06 PM

Tags for this Thread

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