Improve company productivity with a Business Account.Sign Up
Public Function DoesFileFolderExist(strfullpath As String) As Boolean
'25/10/2010, RB: sourced from www.excelguru.ca/node/30 by Ken Puls
'note it only checks for the existence of the lowest folder (or the file) in the strfullpath string.
On Error GoTo EarlyExit
If Not Dir(strfullpath, vbDirectory) = vbNullString Then DoesFileFolderExist = True
On Error GoTo 0
Open in new window
if DoesFileFolderExist("change as required to the Folder name") then
'code if folder exists...
'folder doesn't exist therefore...
msgbox "Folder doesn't exist"
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.