1,216
社区成员
发帖
与我相关
我的任务
分享
Option Explicit
Sub Main()
Dim hFile As Integer
Dim bytes() As Byte
Dim i As Long
hFile = FreeFile()
Open "C:\temp\1.txt" For Binary Access Read As #hFile
ReDim bytes(0 To 9) '长度为 10 字节
Get #hFile, 15, bytes '从第 15 个字节开始
Close #hFile
'验证一下读取的数据
For i = 0 To UBound(bytes)
Debug.Print i, Hex(bytes(i)), Chr(bytes(i))
Next
End Sub
Open "filename" For Binary As #1
Seek #1, 位置