filmov
tv
Excel VBA - How to Check if Folder Exists (Dir function)

Показать описание
Excel VBA Check to see if a folder exists using Dir function
The code used in this video:
Sub CheckIfFolderExists()
Dim MyFolder As String
MyFolder = "C:\Reports1\"
If Dir(MyFolder, vbDirectory) "" Then
MsgBox "Folder exists"
Else
MsgBox "Folder does not exist"
End If
End Sub
The code used in this video:
Sub CheckIfFolderExists()
Dim MyFolder As String
MyFolder = "C:\Reports1\"
If Dir(MyFolder, vbDirectory) "" Then
MsgBox "Folder exists"
Else
MsgBox "Folder does not exist"
End If
End Sub