1

本当に簡単な質問だと思います。LOI.CSV を見るのではなく、日中フォルダ内のすべての .CSV ファイルを見るように、以下を修正するにはどうすればよいですか?

LastSaved = FileDateTime("W:\Settlements\Intraday\LOT.csv")

If LastSaved < Date Then
  MsgBox ("The current day file for LOI was last saved " & LastSaved)
End If
4

1 に答える 1

3

これを試して

Const sPath As String = "W:\Settlements\Intraday\"

Sub LoopThroughFilesInAFolder()
    Dim StrFile As String

    StrFile = Dir(sPath & "\*.Csv")

    Do While Len(StrFile) > 0
        Debug.Print FileDateTime(sPath & "\" & StrFile)
        '~~> Rest of the code here
        StrFile = Dir
    Loop
End Sub
于 2012-07-13T13:12:59.427 に答える