Barrett(バレット)

趣味がメインとなっています。
最近はツイッターでの「つぶやき」のまとめが多いです。
通常更新は、休止状態です。

VBA備忘録3(指定フォルダ内のファイル名を変更)

2024-04-14 19:46:04 | VBA備忘録
Sub FileRename()
'変数の型を宣言
Dim folder_path As String
Dim j As Integer
folder_path = Cells(5, 2) & "\"
j = 1
Do Until Cells(j + 6, 2) = ""
Name folder_path & Cells(j + 6, 2) As folder_path & Cells(j + 6, 4)
j = j + 1
Loop
End Sub

最新の画像もっと見る