【VBA】フォルダの存在確認|FolderExists
記事更新日:2022-11-04

フォルダパスから、フォルダが存在しているか確認
存在していたらtrueを返し、フォルダが存在しなければマクロ終了
Public Function FolderExists( _
ByVal folderPath As String) As Boolean
FolderExists = False
Dim fso As Object: Set fso = SetFSO
If fso.FolderExists(folderPath) Then FolderExists = True
End Function

false(true)だったときにどうするかは、呼び出し先で決定する
必要なもの
関連記事
CLICK
2022-11-04
編集後記:
この記事の内容がベストではないかもしれません。