FileSearch is no longer part of Excel 2007.
Plenty of alternative approaches to be found via google. Eg:
http://www.ozgrid.com/forum/showpost...73&postcount=4
Tim
"John" wrote in message
...
This is code from excel help, Office 2007 excel running windows 7 64 bit.
Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.FileName = "cmd*.*"
If .Execute 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With
The code produces the error "object doesn't support this action" at "Set
fs = Application.FileSearch." I tried "Dim fs as Application" but got same
error.
My first venture into this so I don't know what is going on.
I want to open every excel program in a particular folder, get stuff from
it etc. and close it.
John