之前我有問過一次...一樣還是沒變
這樣寫出來的程式好像只能建立檔案
不能存檔...
還是我哪裡用錯了...請各位高手幫幫忙...
我是要將text內容存成文字檔
=====================================================
Sub savefile(f As String)
Dim fs As New FileSystemObject, taf As TextStream
Set taf = fs.CreateTextFile(f, True)
taf.Write txt1.Text
taf.Close
End Sub
Private Sub Command1_Click()
savefile "c:\1.txt"
End Sub
====================================================
這樣寫出來的程式好像只能建立檔案
不能存檔...
還是我哪裡用錯了...請各位高手幫幫忙...
我是要將text內容存成文字檔
=====================================================
Sub savefile(f As String)
Dim fs As New FileSystemObject, taf As TextStream
Set taf = fs.CreateTextFile(f, True)
taf.Write txt1.Text
taf.Close
End Sub
Private Sub Command1_Click()
savefile "c:\1.txt"
End Sub
====================================================
全站熱搜
留言列表