PDA

Click to See Complete Forum and Search --> : How the heck can I do this...???


killer_cobra
Jul 11th, 2001, 08:15 PM
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 :confused: :confused::confused: :confused: :confused:

jim mcnamara
Jul 11th, 2001, 08:31 PM
'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

killer_cobra
Jul 11th, 2001, 08:38 PM
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