I have a text file in a directory and I want to read the file to an EXCEL worksheet. File name is not fixed but it a text file and it is the only text file in the directory. I would like to use wild card * as name of the file. It does not work. eg
file_name = "d:\test\*.txt"
Open file_name For Input As #1
Apparently we must give the name such as d:\test\abcd.txt. Since I do not always know the name of file I cannot hard code the name in the sub. I want to tell the prog to access the text file in directory "d:\test\". If I could use a wild card ( *.txt) it would have been great.

Any suggestion?

A V Veerkar