Opening a file with date extension
Hi Ivan,
Thanks for coming in as well.
I have tried your code, but what extra piece of code do I need to actualy
open the file once found?
John
"Ivan Raiminius" wrote:
Hi,
Dir doesn't return the full path, so you have to use something like
this:
sPath = "C:\test"
sFilename = "My Import File*.xls"
if len(dir(spath & "\" & sfilename))=0 then
msgbox "No file"
else
sFilename = spath & "\" & dir(spath & "\" & sfilename)
end if
Regards,
Ivan
|