Excel VBAでは、ユーザーにフォルダを選択してもらうことができます。 例えば、 CSV保存先を選ぶ PDF出力先を選ぶ フォルダ内のファイルを一括処理する といった場面で便利です。 基本コード Sub SelectFolder() Dim fd As FileDialog Dim folderPath As String Set fd = Application.FileDialog(msoFileDialogFolderPicker) If fd.Show = -1 Then folderPath = fd.SelectedItems(1) MsgBox folderPath End …