Private Sub Command1_Click()
Dim str As String
Open App.Path & "\tt.txt" For Input As #7
Input #7, str
pic.Print str
Close #7
End Sub
我的电脑上运行上面代码是,老是提示“文件未找到”错误
当我用以下形式时,还是出错:
Private Sub Command1_Click()
Dim str As String
Open "D:\tt.txt" For Input As #7
Input #7, str
pic.Print str
Close #7
End Sub
可是书上就是这么写的,我确定我保存文件了,路径也没有问题
这到底是什么问题,并且貌似在有的机器上却可以运行,有的却可以,为什么?
Dim str As String
Open App.Path & "\tt.txt" For Input As #7
Input #7, str
pic.Print str
Close #7
End Sub
我的电脑上运行上面代码是,老是提示“文件未找到”错误
当我用以下形式时,还是出错:
Private Sub Command1_Click()
Dim str As String
Open "D:\tt.txt" For Input As #7
Input #7, str
pic.Print str
Close #7
End Sub
可是书上就是这么写的,我确定我保存文件了,路径也没有问题
这到底是什么问题,并且貌似在有的机器上却可以运行,有的却可以,为什么?
Private Sub Command3_Click()
Dim str As String
Open App.Path & "\tt.txt" For Input As #7
Input #7, str
Print str
Close #7
End Sub试验了,上面代码没有任何问题,请检查其它。
改正错误后一切正常