maggiepenn 发表于 2005-5-22 18:15:00

请教!如何导出VB中Text文本框的东东?

请问一下,我想把文本框中的内容导出,以文本格式保存在我的电脑中?
我添加了一个Commondialog,以下是Commdialog的代码
Dim imfName As String
                       
                       Form1.CommonDialog1.CancelError = False
                       Form1.CommonDialog1.Filter = "Text File (*.txt)|*.txt|All Files (*.*)|*.*"
                       Form1.CommonDialog1.FilterIndex = 1
                       Form1.CommonDialog1.FileName = "D:\*.txt"
                       Form1.CommonDialog1.Flags = cdlOFNHideReadOnly + cdlOFNFileMustExist
                       Form1.CommonDialog1.ShowSave
                       
                       imfName = Form1.CommonDialog1.FileName

王咣生 发表于 2005-5-22 19:54:00

就是写文本文件啊.
Open pathname For mode As [#]filenumber

maggiepenn 发表于 2005-5-22 19:59:00

已经能导出文本了,还是谢谢王咣生,嘿嘿
页: [1]
查看完整版本: 请教!如何导出VB中Text文本框的东东?