Application.FileSearch code replacement

pmerkel37

New Member
Joined
Nov 6, 2002
Messages
5
Hi - we have had an excel file running for years and now we have upgraded to Excel 2007.

The file now stops with an error around a Application.FileSearch command in the macro.

Thanks in advance

Here is the macro:

Sub Linkages00() 'opens each template, updates the links, and saves it
Set fs = Application.FileSearch
Application.StatusBar = "Linkages: Refreshing Linkages..."
With fs
.Filename = "*.xls"
.LookIn = DrvName & "\testmdus\download\" & Right(RunYr, 2) & RunMo & "\"
.Execute
For i = 1 To .foundfiles.Count
On Error Resume Next
Workbooks.Open Filename:=.foundfiles(i), UpdateLinks:=1, ReadOnly:=False, _
WriteResPassword:="nav", IgnoreReadOnlyRecommended:=True
On Error GoTo 0
ActiveWorkbook.Save
ActiveWorkbook.Close
Next i
End With
Application.StatusBar = "Linkages has completed."
End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,216,126
Messages
6,129,021
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top