如何程序保存用户输入到文本框中的数据
展开全部
楼上的方法有点麻烦,还有添加控件
看这个
'你先建一个Text1和Command1
Private Sub Command1_Click()
Open "D:\qmn.txt" For Output As #1 '...............打开D:\qmn.txt
Print #1, Text1.Text '.......................................输入Text1.Text内容
Close #1 '........................................................关闭qmn.txt
End Sub
看这个
'你先建一个Text1和Command1
Private Sub Command1_Click()
Open "D:\qmn.txt" For Output As #1 '...............打开D:\qmn.txt
Print #1, Text1.Text '.......................................输入Text1.Text内容
Close #1 '........................................................关闭qmn.txt
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub baocun_Click()
CommonDialog1.CancelError = True
CommonDialog1.Filter = "文本文档(*.txt)|*.txt"
CommonDialog1.DialogTitle = "保存"
On Error GoTo Cancel
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
Cancel:
End Sub
先加载一个 CommonDialog1
CommonDialog1.CancelError = True
CommonDialog1.Filter = "文本文档(*.txt)|*.txt"
CommonDialog1.DialogTitle = "保存"
On Error GoTo Cancel
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
Cancel:
End Sub
先加载一个 CommonDialog1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询