View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Application.FileSearch in 2007

You could use the FileSystemObject:

http://support.microsoft.com/kb/185601
http://www.vb-helper.com/howto_list_...hierarchy.html
http://www.vbaexpress.com/kb/getarticle.php?kb_id=232

for mo
http://www.google.com/search?ie=UTF-...ory+search+fso

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Amery" wrote in message
...
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?