Thanks Leith,
That's very helpful in understanding the DIR function.
Now the original question in my post.
I have a number of .HTM files [all in one directory].
I can open these files with Excel and they automatically open as .xls files.
I can access the data by referencing cells etc.
When I try to open them from within VBA, they open as webpages and I can't access data.
From VBA, can I force the system to use Excel to open them?
I have sort of figured out a workaround [not implemented yet].
I can use Name function to change the file extension from .HTM to .XLS and then open them from VBA. But I am not sure if this is the right way to approach the problem.
Thanks again for your help.
modytrane
Bookmarks