文件操作遇到的问题,需要大家帮忙
写了一个二进制流文件,当二次写入的时候不想从头开始写,想接着以前的往下写,怎么操作呢,
Dim strBlackA As String
Dim filenum As Integer
Dim byteSource(20) As Byte
Dim Q As Integer
Dim id As Integer
Dim MyChar
strBlackA = "c:\" & "FileB" & Format(Now, "YYMMDD") & "01" & ".bin"
KillFile "strBlackA"
byteSource(0) = &H0
byteSource(1) = &H1
byteSource(2) = &H2
byteSource(3) = &H3
byteSource(4) = &H4
byteSource(5) = &H5
byteSource(6) = &H6
byteSource(7) = &H7
byteSource(8) = &H8
byteSource(9) = &H9
byteSource(10) = &H10
byteSource(11) = &H11
byteSource(12) = &H12
byteSource(13) = &H13
byteSource(14) = &H14
byteSource(15) = &H15
byteSource(16) = &H16
byteSource(17) = &H17
byteSource(18) = &H18
byteSource(19) = &H19
byteSource(20) = &H20
filenum = FreeFile()
Open strBlackA For Binary As #filenum
For Q = 0 To UBound(byteSource)
Put #filenum, id + Q, byteSource(Q)
Next Q
Close #filenum
就是Put #filenum, id + Q, byteSource(Q)中id的值怎么获得