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
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