sPath = "C:\Data"
if Dir(sPath,vbDirectory) <> "" then
if getAttr(sPath) = vbDirectory then
msgbox sPath & " exists"
end if
end if
You need to do the getAttr because Dir checks for both a file and a
directory when you do Dir(sPath,vbDirectory), so it could be fooled by a
file named C:\data with no extension.