Determining A Valid Directory

  • Thread starter Thread starter Ross
  • Start date Start date
R

Ross

How can I determine that a directory exists, it is
valid.

For example: Is "C:\imports\" a valid directory?

Thanks
 
Ross,

Here is one way to do it:

If Len(Trim(Dir("c:\imports", vbDirectory))) > 0 Then
MsgBox "folder exists"
End If


hth,
 
But whack an On Error around it, just in case the path contains an invalid
drive letter (for example).

TC
 
Back
Top