使用OPEN函数
Private Sub Form_Load()
Dim aa As String
Text1.Text = ""
Open "c:\1.txt" For Input As #1
Do Until EOF(1)
Line Input #1, aa
Text1.Text = Text1.Text & aa & vbCrLf
Loop
Close #1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Open "c:\1.txt" For Output As #1
Print #1, Text1.Text
Close #1
End Sub