R
Rick
The code below works on Windows 2000 or XP home machines,
but not on a XP Professional machine. With XP Pro no
files are found even though they are in the directory.
Can anyone help?
Set fs = Application.FileSearch
With fs
.NewSearch
.lookin = "C:\WCReportCreator\ImportFiles"
.FileName = "*.xls"
If .Execute > 0 Then
For i = 1 To .foundfiles.Count
lstSpreadSheets.AddItem .foundfiles(i)
Next i
Else
MsgBox "There are no files found to import."
End If
End With
Thanks
Rick
but not on a XP Professional machine. With XP Pro no
files are found even though they are in the directory.
Can anyone help?
Set fs = Application.FileSearch
With fs
.NewSearch
.lookin = "C:\WCReportCreator\ImportFiles"
.FileName = "*.xls"
If .Execute > 0 Then
For i = 1 To .foundfiles.Count
lstSpreadSheets.AddItem .foundfiles(i)
Next i
Else
MsgBox "There are no files found to import."
End If
End With
Thanks
Rick