VBAではフォルダ内にあるファイル名を一覧取得できます。 例えば、 Excelファイルを一括処理 PDF一覧を作成 ファイル管理台帳を作成 などでよく使います。 基本コード Sub GetFileList() Dim folderPath As String Dim fileName As String Dim rowNum As Long folderPath = "C:\Test\" fileName = Dir(folderPath & "*.*") rowNum = 1 Do While fileName <> "" Cells(rowNum, 1).Value = fileName …