Then if it does exist on the first server map it that way and if not then check the other server and if it exists there then map it ?
You'd want to use the Dir() function in there, but you're right: it
doesn't work. You could do this:
Dim vDummy As Variant
On Error Resume Next
vDummy = Dir(FolderName & "\")
If Err.Number = 0 Then
' The folder exists and can be accessed.
' The folder doesn't exist, or could not be accessed.
Or you could use the FolderExists method of the FileSystemObject:
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(FolderName) Then
' The folder exists.
' It doesn't.