I made small corrections to your code...Code:Private Sub Command3_Click() Open "X:\Movies.txt" For Append As #1 Write #1, Text1.Text,Text2.Text,Text3.Text,Text4.Text,Text5.Text Close #1 List1.Clear List2.Clear List3.Clear List4.Clear List5.Clear Call Form_Load End Sub Private Sub Form_Load() dim a as string,b as string,c as string,d as string,e as string Open "X:\Movies.txt" For Input As #1 Do While Not EOF(1) Input #1, a,b,c,d,e List1.AddItem a List2.AddItem b List3.AddItem c List4.AddItem d List5.AddItem e Loop Close #1 End Sub
And inside the delete button, you can write this code for saving the data after deleting:
I haven't tested them...Code:dim i as integer Open "X:\Movies.txt" For output As #1 for i=0 to list1.listcount-1 Write #1, list1.(i),list2.(i),list3.list(i),list4.list(i),list5.list(i) next i close #1![]()





Reply With Quote
