FileSearch in Office 2007 generates an error?

X

XP

Using Office 2007 and Windows XP;

Since converting to Office 2007, the following generates an error on the
second line:

Dim ofsSearch As FileSearch
Set ofsSearch = Application.FileSearch

Error is "Object doesn't support this action"; has the FileSearch object
gone away? Or have I just been using it wrong in the past and Office 2003 let
you get away with it?

Could someone please offer an alternative to FileSearch? An example function
to pattern search for a file would be most appreciated. Thanks much in
advance.

Thanks!
 
R

Ron de Bruin

Hi XP

FileSearch is removed from Excel 2007

You can use Dir
See the "Copy/Paste/Merge examples" section on my site for examples.

If you need more help post back
 
X

XP

Thanks Ron!

Ron de Bruin said:
Hi XP

FileSearch is removed from Excel 2007

You can use Dir
See the "Copy/Paste/Merge examples" section on my site for examples.

If you need more help post back
 
D

Don Guillett

Ron, Is there a way to specify sub directories with DIR??
With filesearch you could specify sub folders.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top