What is the syntax to check if a folder exists?

Dim FSo
Dim sFolder As String
sFolder = “<filepath for the folder you want to check>
Set FSO = CreateObject(“Scripting.FileSystemObject”)

If FSO.FolderExists(sFolder)Then
 MsgBox(“Folder Exists”)
Else
 MsgBox(“Folder does not exist”)
End If

To learn how to find a folder’s filepath, click here.

Advertisements