The following works in excel macro when run in excel 2003, But not in 2007 or 2010. Can anyone help me rewrite this so it will work with 2010?
Any help would be great...
Set fs = Application.FileSearch
With fs
.LookIn = logfolder 'logfolder is a inputbox for the user to specify the 'directory where the files sit
.Filename = "*.txt"
If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then
For mainloop = 1 To .FoundFiles.Count
currentfile = .FoundFiles.Item(mainloop)
ParseLog (currentfile)
Next mainloop
Else
MsgBox "There were no files found - check the directory?"
End If
End With
Any help would be great...
Set fs = Application.FileSearch
With fs
.LookIn = logfolder 'logfolder is a inputbox for the user to specify the 'directory where the files sit
.Filename = "*.txt"
If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then
For mainloop = 1 To .FoundFiles.Count
currentfile = .FoundFiles.Item(mainloop)
ParseLog (currentfile)
Next mainloop
Else
MsgBox "There were no files found - check the directory?"
End If
End With