Private Sub Form_Load() If Dir(App.Path & "\ip.txt") <> "" Then Open App.Path & "\ip.txt" For Input As #1 Line Input #1, s Text1.Text = s Close #1 End If End Sub
Private Sub Form_Unload(Cancel As Integer) Open App.Path & "\ip.txt" For Output As #1 Print #1, Text1.Text Close #1 End Sub