Hi,
We just switch over from office 2003 to 2007 and have problem running 1 of the macro.
The person who wrote the macro have left the company & I am at a lost of how to get the macro running.
Reading through the various forums & help pages, it seems that the "FileSearch" portion is the source of the problem but I don't know how to make the necessary amendments.
I have append the FileSearch part of the macro program below
Will really appreciate if someone can help to fix it. Please try to be as simple as possible
Steps for FileSearch:
Code:
With Application.FileSearch
.NewSearch
If Section = "IL" Then
.LookIn = ILPath
Else
.LookIn = OLPath
End If
.SearchSubFolders = False
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
For iWB = 1 To .FoundFiles.Count
Set FoundWB = Workbooks.Open(Filename:=.FoundFiles(iWB), UpdateLinks:=0)
Set FoundWS = FoundWB.Sheets(1)
For iRow = 4 To FoundWS.Range("A65536").End(xlUp).Row
FoundTool = FoundWS.Cells(iRow, "M").Text
If FoundTool = vTool Then
oleDate = Format(FoundWS.Cells(iRow, "A").Text, "dd/MMM/yyyy")
iDate = Year(oleDate) * 10000 + Month(oleDate) * 100 + Day(oleDate)
If iDate >= fDate And iDate <= tDate Then
FoundWS.Rows(iRow).Interior.ColorIndex = 36
FoundWS.Rows(iRow).Copy Destination:=YldWS.Rows(YldWS.Range("A65536").End(xlUp).Row + 1)
End If
End If
Next iRow
FoundWB.Close SaveChanges:=False
Next iWB
End If
End With
Thanks
Freddie