how do i make it. where some one add a item in a list box and close the prog. and next time there open it that item there. but i need it will over 1 item about 1 to 1000.
thanks.
Printable View
how do i make it. where some one add a item in a list box and close the prog. and next time there open it that item there. but i need it will over 1 item about 1 to 1000.
thanks.
The only way I can think about is to save info from ListBox to a file. Here is how to do it (this will involve a CommandButton - cmdAdd, TextBox and ListBox)
Hope this will helpCode:Private Sub cmdAdd_Click()
Dim I As Integer
List1.AddItem Text1.Text
Open "C:\Windows\Desktop\Test.txt" For Output As #1
For I = 0 To List1.ListCount - 1
Print #1, List1.List(I)
Next I
Close #1
End Sub
Private Sub Form_Load()
Dim I As Integer
Dim stLine As String
Open "C:\Windows\Desktop\Test.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, stLine
List1.AddItem stLine
Loop
Close #1
End Sub
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.