millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 334
I got this code from Excel help and it doesn't seem to be working and I am not sure why.
I get an erro on Application.FileSearch that "Object doesn't support action"
Any ideas?
Thanks
I get an erro on Application.FileSearch that "Object doesn't support action"
Any ideas?
Thanks
Code:
With Application.FileSearch
.NewSearch
.LookIn = Currentpath
.FileType = msoFileTypeExcelWorkbooks
'.Filename = "Book*.xls"
If .Execute > 0 Then 'Workbooks in folder
For lCount = 1 To .FoundFiles.Count 'Loop through all.
'Open Workbook x and Set a Workbook variable to it
Set wbResults = Workbooks.Open(Filename:=.FoundFiles(lCount), UpdateLinks:=0)
'ActiveWorkbook.Range("D153:D223").Copy
'X = X + 2
'CodeWB.Worksheet("Scoring Calc").Cells(16, X + 2).Paste
'wbResults.Close SaveChanges:=False
Next lCount
End If
End With