Im after some code that will check to see if a file exists in a specific location.
Ive been given the below two examples but i cant get them to work.
example 1
if Not Dir("C:\DATA\YOURFILE.XLS") then
'the bugger isnot there!
end if
example2
Sub DoesFileExist()
Set MyFile = CreateObject("Scripting.FileSystemObject")
MsgBox MyFile.FileExists("c:\filename.xls")
End Sub
Bookmarks