我有一个变量声明如下 -
Public CA() As Byte
当我想将此内容写入文件时,我会执行以下操作 -
myStr = StrConv(CA, vbUnicode)
intFileHandle = FreeFile
Open "myFile.txt" For Output As #intFileHandle
Print #intFileHandle, myStr
Close #intFileHandle
但是,我不确定这是否正确。你能推荐一种正确的方法将字节数组的内容写入文件吗?
答案 0 :(得分:3)
fnum = FreeFile
Open "myFile.txt" For Binary As #fnum
Put #fnum, 1, CA
Close fnum