说明一下
cd1是CommonDialog的对象
ra是全局变量,是一个路径
目的是文件二进制复制
Dim b As String * 1, i As Integer
If (Not Trim(cd1.FileName) = "") And (Not Trim(ra) = "") Then
Set fso = CreateObject("scripting.filesystemobject")
Set a = fso.createtextfile(cd1.FileName)
Open cd1.FileName For Binary As #1
Open ra For Binary As #2
For i = 1 To LOF(2)
Get #2, , b
Put #1, , b
Next i
End If
Close #1, #2
执行到 Put #1, , b 时候提示出错
但是
我把代码改成
For i = 1 To LOF(2)
‘Get #2, , b
’Put #1, , b
Get #1, , b
MsgBox b
Next i
就能运行起来,说明这不是路径的错啊?
那位大侠帮我看看那里错了,小弟感激不尽