Results 1 to 3 of 3

Thread: How the heck can I do this...???

  1. #1

    Thread Starter
    Addicted Member killer_cobra's Avatar
    Join Date
    Jun 2001
    Location
    Lost in space
    Posts
    131

    How the heck can I do this...???

    As I am new to VB, (just switched over from Rapid-Q), I am finding that 60% of my commands don't work in VB.

    I need to:

    1. Be able to save a list of text strings into a file from a listbox control.

    2. Save the next list I create in the same file but beginning the next line after the end of the first list. (basically a growing database)

    This is really stumping me, and so I turn to you fine people to help me out.

    Many millions of thanks in advance!!!!!!!!

    Scott

  2. #2
    jim mcnamara
    Guest
    Code:
    'save first listbox
    Open "Myfile.txt" for output as #1
    For i = 0 to List1.ListCount - 1
           Print #1, List1.List(i)
    next 
    close #1
    
    ' save next data from listbox
    open "myfile.txt" for append as #1
    For i = 0 to List2.ListCount - 1
            Print #1, list2.List(i)
    next
    close #1

  3. #3

    Thread Starter
    Addicted Member killer_cobra's Avatar
    Join Date
    Jun 2001
    Location
    Lost in space
    Posts
    131

    Thank you so much Jim!!

    Thanks for the code snippets, It's definetly hard to go from one language to another, but I had to due to the limitations in Rapid-Q Beta. I still love that program though, I learned the basics and concepts of programming with that compiler... Time to move on to better languages though.

    Thanks again,

    Scott

    Ps, Just to save me the little bit of time I would spend in trial and error, could you tell me how I could load this file into a listbox??

    Thnx

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