VB 怎么将list1.list(i)路径文件打开并赋值给a(i)?
Fori=0ToList2.ListCount-1openlist2.list(i)ForBinaryAccessWriteAs#2'list2.list(0)=c:\1...
For i = 0 To List2.ListCount - 1
open list2.list(i) For Binary Access Write As #2 'list2.list(0)=c:\1.txt
get #2, ,a(i)
close #2
Next 展开
open list2.list(i) For Binary Access Write As #2 'list2.list(0)=c:\1.txt
get #2, ,a(i)
close #2
Next 展开
3个回答
展开全部
For i = 0 To List2.ListCount - 1
open list2.list(i) For Binary Access Write As #2 'list2.list(0)=c:\1.txt
a(i) = Space(LOF(2))
Get #2, , a(i)
close #2
Next
open list2.list(i) For Binary Access Write As #2 'list2.list(0)=c:\1.txt
a(i) = Space(LOF(2))
Get #2, , a(i)
close #2
Next
追问
Get #2, , a(i)
显示下标越界。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim arr() As Byte, a()
ReDim a(list2.ListCount - 1)
For i = 0 To list2.ListCount - 1
Open list2.List(i) For Binary Access Write As #2 'list2.list(0)=c:\1.txt
ReDim arr(LOF(2))
Get #2, , arr
Close #2
a(i) = arr
Next
ReDim a(list2.ListCount - 1)
For i = 0 To list2.ListCount - 1
Open list2.List(i) For Binary Access Write As #2 'list2.list(0)=c:\1.txt
ReDim arr(LOF(2))
Get #2, , arr
Close #2
a(i) = arr
Next
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询