|
|
Hi folks
I have a directory that contains a number of xml files tthe names of which I want to display as a list in a list box on a form.
Part of the code involves getting a count of the applicable files. The files I am interested in have the format:
PO?.xml
Where ? is a number. For example PO1.xml, PO2.xml etc ....
The section of code that determines the number of files is like this:
Set fs = Application.FileSearch With fs .NewSearch .LookIn = "C:\My Documents\SOAC\Intro to XML\Example XML App\Purch Order and Details" .FileName = "PO*.xml" If .Execute() > 0 Then intFileCount = .FoundFiles.Count End If End With
Unfortunately it is returning 0 as the number of files that have been found.
I have tried the code using the .Lookin property set to:
C:\Documents and Settings\Ross\My Documents\SOAC\Intro to XML\Example XML App\Purch Order and Details
But this doesn't seem to make any difference.
If anybody could help I would really appreciate it.
Kind regards
Ross Petersen
|
|
|