well. you can save the form as an exe from code?
anyway I think this is what you want.
User types data in a text field... then closes the program
when opened.. the text is back in the field?
VB Code:
Private Sub Form_Load() If Len(Dir(App.Path & "\data.txt")) <> 0 Then Open App.Path & "\data.txt" For Input As #1 Text1.Text = Input(LOF(1), 1) Close #1 End If End Sub Private Sub Form_Unload(Cancel As Integer) Open App.Path & "\data.txt" For Output As #1 Print #1, Text1.Text Close #1 End Sub




Reply With Quote