Private Sub Form_Unload(Cancel As Integer)
Open App.Path & "\MenuList1.Dat" For Output As #1
For N = 0 To Combo1.ListCount - 1
Print #1, Combo1.List(N)
Next
Close #1
End Sub
我寫上面的程式來儲存紀錄...
但是這樣的話每次儲存都會把之前的檔案蓋掉...
有辦法改善嗎?
2007-02-01 19:59:03 · 1 個解答 · 發問者 KCVO 1 in 電腦與網際網路 ➔ 程式設計
'Output改成Append即可
圖片參考:http://tw.yimg.com/i/tw/blog/smiley/3.gif
Private Sub Form_Unload(Cancel As Integer)
Open App.Path & "MenuList1.Dat" For Append As #1
For N = 0 To Combo1.ListCount - 1
Print #1, Combo1.List(N)
Next
Close #1
End Sub
2007-02-01 20:33:55 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋