[求助]代码怎么运行都有错误
怎么运行不起来呢?
Private Sub Command1_Click()
Dim fil As File
Set fil = fso.GetFile(App.Path & "\1.txt")
Open App.Path & "time.txt" For Output As #1
Print #1, fil.DateLastModified
Close #1
End Sub
怎么运行不起来呢?
Private Sub Command1_Click()
Dim fil As File
Set fil = fso.GetFile(App.Path & "\1.txt")
Open App.Path & "time.txt" For Output As #1
Print #1, fil.DateLastModified
Close #1
End Sub
第二行:Set fil = fso.GetFile("D:\1.txt")
实时错误'424'
要求对象
[此贴子已经被作者于2006-12-14 21:35:31编辑过]
有的
各位 我知道出现问题的所在了
少了一句“Dim fso As New FileSystemObject”
完整的代码如下:
Private Sub Command1_Click()
Dim fil As File
Dim fso As New FileSystemObject
Set fil = fso.GetFile(App.Path & "\1.txt")
Open App.Path & "time.txt" For Output As #1
Print #1, fil.DateLastModified
Close #1
End Sub
谢谢 我也自己查出来了
anyway,thank you all the same。