这样应该可以吧!
Private Sub Form_Unload(Cancel As Integer)
Open App.Path & "\" & "1.txt" For Output As #1
Write #1, a
Close #1
Text1.Text = ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
Open App.Path & "\" & "1.txt" For Output As #1
Write #1, a
Close #1
Text1.Text = ""
End Sub