The following code fragment
may be useful when inspecting the content of sample_folder. I did successfully use that code pattern many times in the past (under Office 2003) but now it fails to work (under Office 2007). Here is the error message which I get:
Indeed, the Application.FileSearch property is not supported, but I can't figure why. Once again, this behaviour appeared after replacing MS Office 2003 with MS Office 2007.
The following items are checked under Tools -> References in my VBA setting:
1. Visual Basic For Application
2. Microsoft Excel 12.0 Object Library
3. OLE Animation
4. Microsoft Office 12.0 Object Library
Can anybody please explain me why Application.FileSearch property fails to work?
Thanks a lot in advance!
Code:
With Application.FileSearch
.LookIn = sample_folder
.
.
.
End With
Code:
Run-time error 445
Object doesn't support this action
The following items are checked under Tools -> References in my VBA setting:
1. Visual Basic For Application
2. Microsoft Excel 12.0 Object Library
3. OLE Animation
4. Microsoft Office 12.0 Object Library
Can anybody please explain me why Application.FileSearch property fails to work?
Thanks a lot in advance!