Click to See Complete Forum and Search --> : text box


midnightservice
September 18th, 2001, 07:03 PM
is there a way to save the contents of a text box until the user changes it....it remains the same during startup and shut down till you put in a new amount.....

thanx

midnightservice

makai
September 18th, 2001, 11:10 PM
Dim tFile$

private Sub Form_Load()
Dim f%, t$

tFile = "c:\text1.ini"
If Dir$(tFile) <> "" then
f = FreeFile
Open tFile for input as f
Line input #f, t
Text1.Text = t
Close f
End If
End Sub

private Sub Form_Unload(Cancel as Integer)
Dim f%

f = FreeFile
Open tFile for Output as f
print #f, Text1.Text
Close f
End Sub

dimspyder
September 19th, 2001, 02:09 AM
hi i was just wondering if you knew of a way to do that same thing, but with 3 textbox, 2 listbox, and a chkbox all on same form? thats exactly the kind of thing i need if you can help. thanks,

-frank

Cakkie
September 19th, 2001, 03:28 AM
You can also link listboxes and checkboxes to a datacontrol. For listboxes, you will need to fill the list yourself, but it should automatically select the correct item, and save it.


Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook