mbrwny20
01-19-2006, 02:17 PM
Hello, I am trying to modify the code below, so that if the path does not exist then prompt the user for id and password and then login to the server.
Sub FolderExists()
Dim fso
Dim folder As String
folder = "\\server\shr\mcl (file://%5Cservershrmcl)" ' change to match the folder path
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(folder) Then
MsgBox folder & " is a valid folder/path.", vbInformation, "Path Exists"
Else
MsgBox folder & " is not a valid folder/path.", vbInformation, "Invalid Path"
End If
End Sub
Sub FolderExists()
Dim fso
Dim folder As String
folder = "\\server\shr\mcl (file://%5Cservershrmcl)" ' change to match the folder path
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(folder) Then
MsgBox folder & " is a valid folder/path.", vbInformation, "Path Exists"
Else
MsgBox folder & " is not a valid folder/path.", vbInformation, "Invalid Path"
End If
End Sub