K
Kang Onechoon
I have several macros written for excel which use filesearch method retrieve
files within a directory. It appears that Office 2007 no longer supports
this.
Any suggestions on how to replace this code ?
---------------------------------------------------------------------------------------------
Sub fileSearchff()
Dim intNum As Integer
With Application.FileSearch
.NewSearch
.Filename = "*.xls"
.LookIn = "C:\"
.SearchSubFolders = True
.Execute
Application.DisplayAlerts = False
For intNum = 1 To .FoundFiles.Count
Workbooks.Open Filename:=.FoundFiles(intNum)
ActiveWorkbook.SaveAs Filename:=.FoundFiles(intNum), _
FileFormat:=xlNormal, Password:="aaaaa", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
Cells(intNum, 1) = .FoundFiles(intNum)
Next
Application.DisplayAlerts = True
End With
End Sub
Thank you in advance
files within a directory. It appears that Office 2007 no longer supports
this.
Any suggestions on how to replace this code ?
---------------------------------------------------------------------------------------------
Sub fileSearchff()
Dim intNum As Integer
With Application.FileSearch
.NewSearch
.Filename = "*.xls"
.LookIn = "C:\"
.SearchSubFolders = True
.Execute
Application.DisplayAlerts = False
For intNum = 1 To .FoundFiles.Count
Workbooks.Open Filename:=.FoundFiles(intNum)
ActiveWorkbook.SaveAs Filename:=.FoundFiles(intNum), _
FileFormat:=xlNormal, Password:="aaaaa", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
Cells(intNum, 1) = .FoundFiles(intNum)
Next
Application.DisplayAlerts = True
End With
End Sub
Thank you in advance