<pre id=\"best-answer-content\" class=\"reply-text mb10\">Private Sub FORM_LOAD()\'把数据读到文本框里
Dim R As String
Open App.Path defds123 \"\\\" defds123 \"A.TXT\" For Input As #1
Do While EOF(1) = False
Line Input #1, R
Text1.Text = Text1.Text defds123 vbCrLf defds123 R
Loop
Close #1
End Sub
Private Sub COMMAND1_click() ‘写入改变的数据
Open App.Path defds123 \"\\\" defds123 \"A.TXT\" For Output As 1
Print #1, Text1.Text
Close #1
End Sub
经过验证通过运行,注意这里的A.TXT的路径你可以自己设定,呵呵