Trying to loop through all files in a folder and copy and paste special values in two of the worksheets tabs. I know this has been discussed before but nothing I've tried seems to work. Below, is my most recent abomination in pursuit of saving time. The files names are not in any type of order.

Any help would be appreciated



Dim inputfile As String

inputfile = Dir("c:\myfolder\*.xls")


With Application.FileSearch
.NewSearch
.LookIn = inputfile
.FileType = msoFileTypeExcelWorkbooks


For i = 1 To .FoundFiles.Count
temp = .FoundFiles(1)
ActiveSheet.Columns("a:y").Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _:=False, Transpose:=False
Next i

End With
End Sub


Any help would be appreciated.