ant
June 23rd, 2001, 08:51 PM
I finally figured out how to keep an item in a listbox when the user exits. Thanks to all who helped me.
And i didn't use a database
--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: cgeorge@thevortex.com
for the address
John G Duffy
June 25th, 2001, 05:19 PM
Just as a point of order. If you find out how do do something, share the knowledge with the rest of us that answer your questions.
John G
ant
June 26th, 2001, 10:51 AM
private Sub Command1_Click()
Dim a
a = InputBox("enter item")
List1.AddItem a
RichTextBox1.Text = a
End Sub
private Sub Form_Load()
Dim FilePath as string
FilePath = App.Path & "\test.txt"
If len(Dir(FilePath)) = 0 then
Dim f as Integer
Dim fso as FileSystemObject
f = FreeFile
set fso = new FileSystemObject
fso.CreateTextFile App.Path & "\test.txt", true
Open App.Path & "\test.txt" for Output as f
print #f, RichTextBox1.Text
Close f
List1.AddItem RichTextBox1.Text
else
RichTextBox1.filename = App.Path & "\test.txt"
End If
List1.AddItem RichTextBox1.Text
End Sub
private Sub Form_QueryUnload(Cancel as Integer, UnloadMode as Integer)
Dim f as Integer
Dim fso as FileSystemObject
f = FreeFile
set fso = new FileSystemObject
fso.CreateTextFile App.Path & "\test.txt", true
Open App.Path & "\test.txt" for Output as f
print #f, RichTextBox1.Text
Close f
End Sub
--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: cgeorge@thevortex.com
for the address