【VBA】フォルダの存在確認|FolderExists
記事更新日:2022-11-04
![サムネイル](https://tsukiusagi.biz/wp-content/uploads/2022/09/vba.png)
フォルダパスから、フォルダが存在しているか確認
存在していたら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
![](https://i0.wp.com/tsukiusagi.biz/wp-content/uploads/2022/01/rabbit1-2.png?resize=150%2C150&ssl=1)
false(true)だったときにどうするかは、呼び出し先で決定する
必要なもの
関連記事
CLICK
2022-11-04
編集後記:
この記事の内容がベストではないかもしれません。