写了一个程序,每隔1秒调用一次下面的函数,但是当此时外部程序 C 读 c:/input.txt,总是报不能读取此文件,报错,不知为什么?'写入
Function WriteTxt(i As Integer) Set fso = CreateObject("Scripting.fileSystemObject")
Set ts = fso.createTextFile("c:/input.txt", True)
ts.write (i)
ts.Close
End Function不知道大家有没有相关源程,比较急,谢谢大家。
Function WriteTxt(i As Integer) Set fso = CreateObject("Scripting.fileSystemObject")
Set ts = fso.createTextFile("c:/input.txt", True)
ts.write (i)
ts.Close
End Function不知道大家有没有相关源程,比较急,谢谢大家。
--------------------------------------
Function WriteTxt(ByVal i As Integer)
Private Sub Timer1_Timer()
Dim strTmp As String
Open "c:\input.txt" For Input As #1
Line Input #1, strTmp
Close #1
Debug.Print strTmp
End Sub