>>717
Sub foo(FolderPath As String)
Dim FSO As New FileSystemObject
Dim c As New Collection
Dim Folder As Folder
Dim File As File
FindWord = "*" & Month(Date) & "*"
Set Folder = FSO.GetFolder(FolderPath)
For Each File In Folder.Files
If File.Name Like FindWord Then Exit For
Next
If File Is Nothing Then Exit Sub
s = Split(File.Path, "\")
For i = LBound(s) To UBound(s)
If s(i) Like FindWord Then
e = Split(s(i), ".")
s(i) = Month(DateAdd("m", 1, Date)) & s(1)
End If
FilePath = FilePath & s(i)
If i < UBound(s) Then FilePath = FilePath & "\"
Next
FSO.CopyFile File.Path, FilePath
End Sub
試してないけどこんな感じかなぁ。
Excel VBA 質問スレ Part51
■ このスレッドは過去ログ倉庫に格納されています
719デフォルトの名無しさん (ワッチョイ cfb9-bqMz)
2017/12/25(月) 00:16:31.32ID:2KDGjSox0■ このスレッドは過去ログ倉庫に格納されています
ニュース
