I have an excel with macro that:
1.) Column C value containts the directory the file that I am looking for
2.) search the directory in Column C for file in Column A.
3.) Save the file into a new Directory with the name specify in Column B
There is already a macro that is in the file that does that, just need that it uses Application.FileSearch.
which do not work in Excel 2010
looking for some to correct the existing macro: here is the macro below
Dim File_Name As Variant
Dim File_Save As Variant
Dim Folder_Name As Variant
Folder_Name = InputBox("What Folder Would you like to Save the CEAs in?")
Final_Row = Workbooks("Monthly Controllable Save.xls").Sheets(1).Range("A65000").End(xlUp).Row
For x = 1 To Final_Row
File_Name = Range("A" & x).Value
File_Save = Range("B" & x).Value
Dim i As Integer
With [login to view URL]
.LookIn = Range("C" & x).Value
'* represents wildcard characters
.Filename = Trim(File_Name) & "???????.xls"
If .Execute > 0 Then 'Workbook exists
For i = 1 To .[login to view URL]
[login to view URL] (.FoundFiles(i))
[login to view URL] Filename:= _
"b:\r p\OSUS\Monthly Analysis Folders\Monthly Analysis 2011\" & Folder_Name & "\Intl Monster\" & File_Save & ".xls"
[login to view URL]
Next i
End If
End With
Next x