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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,215,650
Messages
6,126,012
Members
449,280
Latest member
Miahr

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