新建一个按钮Command1
代码:
Private Sub Command1_Click()
Opten "C:\123.TXT" For OutPut As #1 '打开文件
Print #1,Text1.text '写入
Close #1 ’关闭文件
End Sub
Private Sub Command1_Click()
Dim fFile As Integer
fFile = FreeFile
Open "c:\123.txt" For Append As fFile
Print #fFile, "-" & Text1.Text
Close fFile
End Sub
Private Sub Command1_Click()
Open "C:\123.txt" For Output As #1
Print #1, Text1.Text
Close #1
End Sub
'画面添加command1 text1