如何将VB程序中输入文本框的内容保存到一个TXT文本文件里?

2024-12-26 12:01:46
推荐回答(2个)
回答1:

这样应该可以吧!

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

回答2:

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