Application.FileSearch in 2007
I have a batch of code that works for any computer with 2003 or earlier
versions, and I have been told by 2007 that it no longer is allowed. Here's
the code..
dim fs as variant
Set fs = Application.FileSearch
With fs
.LookIn = Sheet2.Cells(6, 4)
.Filename = "*.xls"
If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending)
0 Then
end if
End With
The code breaks at the set command and says something regarding the fact
that 2007 no longer supports the method or object. Does anyone know of a way
to get this to work in Excel '07?
|