If you are working in Access:
Public Function FolderExists(varPath As Variant) As Boolean
On Error Resume Next
If Len(varPath) > 0& Then
FolderExists = (Len(Dir$(varPath, vbDirectory)) > 0&)
End If
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Bruce" <(E-Mail Removed)> wrote in message
news:E63426DB-1C6A-4D39-A051-(E-Mail Removed)...
> in my code below a is a path to a remote server. How can I test if the
> path
> exists;
>
> i.e if a something then....
>
> Bruce
>
> Private Sub copyDB()
>
> Set fs = CreateObject("Scripting.FileSystemObject")
>
> myDest = Array("\\myServer\myShare\myFolder\")
>
> For Each a In myDest
> If a not exist then
> Msgbox("Path not Found")
> End
> End if
> Next a
> End Sub