Private Sub Command1_Click()
Dim d As String, t As Date, s As String
d = Dir(App.Path & "\*.txt")
Do Until d = ""
If FileDateTime(App.Path & "\" & d) > t Then
t = FileDateTime(App.Path & "\" & d)
s = App.Path & "\" & d
End If
d = Dir
Loop
MsgBox "最新的txt文件是" & s
End Sub
这是个找TXT的,你自己改改,原创代码
温馨提示:答案为网友推荐,仅供参考