如何保存文本框转到列表框内的新数据?
下面是将文本框内的数据保存到列表框。但重新启动后就新数据就不显了,请问如何才能保存?Private Sub Command1_Click()
List1.AddItem Text1.Text
End Sub
[此贴子已经被作者于2018-7-3 21:27编辑过]
Private Sub Command1_Click() If Text1.Text <> "" Then Open App.Path & "\123.txt" For Append As #1 Write #1, Text1.Text Close #1 List1.AddItem Text1.Text Text1.Text = "" End If End Sub Private Sub Form_Load() Open App.Path & "\123.txt" For Input As #1 Do While Not EOF(1) Input #1, TT List1.AddItem TT Loop Close #1 End Sub
[此贴子已经被作者于2018-7-4 11:04编辑过]