validate a directory or file exits
if dir("C:\Myfolder\Myfile.xls") = "" then
msgbox "It doesn't exist"
exit sub
Else
workbooks.Open c:\Myfolder\Myfile.xls"
End if
--
Regards,
Tom Ogilvy
"Simon Shaw" wrote in message
...
How do I validate if a file exists without using On Error Resume Next then
trying to open it?
|