My program opens a log file in a listbox every time it opens but when it closes it needs to save the new items added.. i tried this code but it only saved 1 line out of the list box..
Private Sub Form_Unload(Cancel As Integer)
Dim list As ListBox, name As String
For i = 0 To List1.ListCount - 1
Data$ = List1.list(i)
Open "C:\BLABLA.text" For Output As #1
Print #1, Data$
Close 1
Next i
End
End Sub
So this will only save the first line of the list but it needs to save the entire list no matter how long it is.. cuz its a log..
Maybe this is a very novice question and the awnser is very simple but i could find the awnser on this forum so i thought i ask it myself
well hope u guys can help me out..
Greetings
Private Sub Form_Unload(Cancel As Integer)
Dim list As ListBox, name As String
For i = 0 To List1.ListCount - 1
Data$ = List1.list(i)
Open "C:\BLABLA.text" For Output As #1
Print #1, Data$
Close 1
Next i
End
End Sub
So this will only save the first line of the list but it needs to save the entire list no matter how long it is.. cuz its a log..
Maybe this is a very novice question and the awnser is very simple but i could find the awnser on this forum so i thought i ask it myself
Greetings