Application.FileSearch problem

W

Wayman Bell

I have the following code that runs great on my laptop. It will run through
1400 Excel files in about 10 minutes while the MackGet file will copy the
data I need and paste it into an accumulating spreadsheet. When I take the
code to my computer at work though the code stops at

'With Application.FileSearch' with emphasis on Application. Can anyone give
me any ideas to try to work this out.

Thanks, Wayman

**********************
Sub FileList()
Dim File As Variant
Dim i As Integer
Dim Wkb As Workbook

With Application.FileSearch
.LookIn = "C:\Email_Attachments"
.FileType = msoFileTypeExcelWorkbooks
.Execute
For Each File In .FoundFiles

Application.Workbooks.Open (File)

MackGet
Next File
End With

MsgBox Prompt:="Files processed and saved to the Cumulative Workbook!"
Sheets("Site").Select
ActiveWorkbook.Save
End Sub
************************
 
W

Wayman Bell

XP on both computers. We figured out today that it is my profile at work and
I do not have the correct permissions so I am going through the channels to
get approval. The code did work when my profile was temporarily changed.

Thanks,

Wayman
 
Top