I am trying to search a file and eventhoug the file is on a network drive it always comes up with not found message
dim response as long
dim fs as long
Set fs = CreateObject("Scripting.FileSystemObject")
file = "OPENORDER" & Format(DATE - 3, "mmddyy") & ".XLS" ' change to match the file w/Path
MsgBox file
response = fs.FileExists(file)
If response = -1 Then
msgbox "File found"
else
msgbox "file not found"
end if
villica
dim response as long
dim fs as long
Set fs = CreateObject("Scripting.FileSystemObject")
file = "OPENORDER" & Format(DATE - 3, "mmddyy") & ".XLS" ' change to match the file w/Path
MsgBox file
response = fs.FileExists(file)
If response = -1 Then
msgbox "File found"
else
msgbox "file not found"
end if
villica