|
-
June 23rd, 2001, 08:51 PM
#1
thanks
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: [email protected]
for the address
-
June 25th, 2001, 05:19 PM
#2
Re: thanks
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
-
June 26th, 2001, 10:51 AM
#3
Re: thanks
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: [email protected]
for the address
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|