Opening a file with date extension
mmm,
Thanks Bob
I dont even know how to apply it. I tried putting it into the code and
turned red??
How about if I had the file already open, for example:
Windows("Price Update 22-May-06.xls").Activate
But the code would ignore the 22-May-06?
John
"Bob Phillips" wrote:
You could do a Dir before opening to get the full file name
sFilename = Dir("C:\Test\My Import File*.xls"
note that this will return the first found if there are many.
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
"JohnUK" wrote in message
...
Hi,
I have a workbook that opens a file, imports data and closes it down
again.
The problem I have or will have:
The file that holds the data will change the name by having a date added,
so
this will now mean I will have to manualy open the file and minus off the
date so that I can import.
Is there a way the macro can ignore the date so that it would still open
the
file and import the data?
Again - your support is greatly appreciated
John
|