Private Sub cmdSave_Click()
""儲存為文字檔案
Dim FileNumber
Dim strOuttmpFile As String "定義輸出檔案的名稱
Dim strPrinteTxt As String "定義輸出檔案的內容
strOuttmpFile = APP.Path & "mytxt.txt"
strPrinteTxt=text1.text & "|" & text2.text
On Error GoTo Err2
FileNumber = FreeFile "開啟檔案並追寫新資料到檔案尾
Open strOuttmpFile For Append As #FileNumber
Print #FileNumber, strPrinteTxt
Close #FileNumber
End Sub
Private Sub cmdSave_Click()
""儲存為文字檔案
Dim FileNumber
Dim strOuttmpFile As String "定義輸出檔案的名稱
Dim strPrinteTxt As String "定義輸出檔案的內容
strOuttmpFile = APP.Path & "mytxt.txt"
strPrinteTxt=text1.text & "|" & text2.text
On Error GoTo Err2
FileNumber = FreeFile "開啟檔案並追寫新資料到檔案尾
Open strOuttmpFile For Append As #FileNumber
Print #FileNumber, strPrinteTxt
Close #FileNumber
End Sub