vb 寫檔的問題 .

2008-12-19 12:23 am
Open fil_w For Binary Access Write As #1

Put #1, , byte()

Close #1

每次執行完都會重做檔案,
有沒有辦法開成 Append 的模式, 每次開檔就加在檔尾就好了 ?

用 VB6 寫的 .
更新1:

沒用耶...

回答 (1)

2008-12-19 12:45 am
✔ 最佳答案
試試 Open fil_w For Binary Access Append As #1

Write改成Append

2008-12-18 18:57:16 補充:
先取出檔案大小 FileLen("C:\123.txt")



  Dim s As Byte
  
  s = 123
  Dim fl As Integer
  fl = FileLen("C:\123.txt")
  Open "C:\123.txt" For Binary Access Write As #1
    Seek #1, fl + 1
    Put #1, , s
  Close #1

就會把資料加在最後面了。 Try it~
參考: Myself, 供您參考


收錄日期: 2021-04-24 10:05:50
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20081218000015KK05104

檢視 Wayback Machine 備份