- 帖子
- 132
- 主題
- 56
- 精華
- 0
- 積分
- 190
- 點名
- 0
- 作業系統
- Win10
- 軟體版本
- Office 365
- 閱讀權限
- 20
- 性別
- 男
- 註冊時間
- 2012-5-17
- 最後登錄
- 2025-4-8
|
本帖最後由 acdx 於 2013-11-12 14:10 編輯
回復 2# GBKEE
按下Save時可選擇儲存路徑
->將TextBox1~TextBox5內容以行為單位依序排列寫入text file
Ex: TextBox1=10, TextBox2=3, TextBox3=9.5, TextBox4=7, TextBox5=0.3
text file: 10
3
9.5
7
0.3
->顯示一個視窗: 可以選擇儲存路徑及命名
按Load時可選擇不同路徑下的txt檔
->顯示一個視窗: 可以選擇要開啟的text file
->將text file中以行為單位依序寫入TextBox1~TextBox5
Ex:
Private Sub CommandButton2_Click()
Dim txtFile As String
txtFile = Application.GetOpenFilename("文字文件,*.txt;*.txt")
If txtFile = CStr(False) Then
MsgBox "No file was selected."
End If
將text file中以行為單位依序寫入TextBox1~TextBox5
End Sub |
|