vb 打开文件出错??为什么?大家帮帮忙!

来源:百度知道 编辑:UC知道 时间:2024/05/15 03:12:39
dim n as integer,t( 1 to 10 ) as string
Open "c:\d.dat" For Binary As 1
Do Until EOF(1)
Get #1, , t(n)
n = n + 1
Loop
Close #1
运行错误:文件已打开!
前面的程序没有打开此文件!!
急急急……
e-mail:kracule@sina.com

'先改成。
close 1
dim n as integer,t( 1 to 10 ) as string
Open "c:\d.dat" For Binary As 1
Do Until EOF(1)
Get #1, , t(n)
n = n + 1
Loop
Close #1
’运行。
’再改成
dim n as integer,t( 1 to 10 ) as string
Open "c:\d.dat" For Binary As #1
Do Until EOF(1)
Get #1, , t(n)
n = n + 1
Loop
Close #1
’这样就可以了。