excel vba folder exists code example
Example 1: excel vba check if directory exists
Public Function IsDir(s)
IsDir = CreateObject("Scripting.FileSystemObject").FolderExists(s)
End Function
Example 2: excel vba folder exist
If Dir("C:\Temp\xxx", vbDirectory) = "" Then
MsgBox "Doesn't exists"
End If