I have a function that will search for a csv file in a directory.
In the directory, I have 2 files, named "FGIVAL_2008-02-11.csv" and "WFGIVAL_2008-02-11.csv". By using the above search function, it will returns both file name.![]()
Set fs = Application.FileSearch With fs .LookIn = DefaultFolder .Filename = "FGIVAL*.csv" If .Execute > 0 Then 'Some code End If End With
But I dont expect the file name starts with "W" to be in the search result. I really dunno what is going on here.
Anyone please advice.
Thanks.
Bookmarks