vb将读取的文件放入arr数组中
1个回答
展开全部
Dim
FileNameStr
As
String
Dim
FileNum
As
Long
Dim
By()
As
Byte
'变量赋值
FileNameStr
=
"C:\Documents
and
Settings\Administrator\桌面\test.txt"
'文件号冲衫采用空闲文件号,不手判皮指毕差定
FileNum
=
FreeFile
Open
FileNameStr
For
Binary
As
#FileNum
'二进制打开方式
ReDim
By(1
To
LOF(FileNum))
Get
#FileNum,
,
By
Close
#FileNum
Debug.Print
StrConv(By(),
vbUnicode)
FileNameStr
As
String
Dim
FileNum
As
Long
Dim
By()
As
Byte
'变量赋值
FileNameStr
=
"C:\Documents
and
Settings\Administrator\桌面\test.txt"
'文件号冲衫采用空闲文件号,不手判皮指毕差定
FileNum
=
FreeFile
Open
FileNameStr
For
Binary
As
#FileNum
'二进制打开方式
ReDim
By(1
To
LOF(FileNum))
Get
#FileNum,
,
By
Close
#FileNum
Debug.Print
StrConv(By(),
vbUnicode)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询