mlmcelligott
New Member
- Joined
- Jun 20, 2014
- Messages
- 2
Hi
Newbie here posting for the first time, hi everyone. Ive been given an old spreadsheet to use and there's an issue with application.filesearch and excel 2010. The code is below. Could one of you nice guys recommend a fix for it??
Newbie here posting for the first time, hi everyone. Ive been given an old spreadsheet to use and there's an issue with application.filesearch and excel 2010. The code is below. Could one of you nice guys recommend a fix for it??
Code:
Set blah = Application.FileSearch
With Application.FileSearch
.NewSearch
.Filename = "*VaR*"
.LookIn = directory
.LastModified = msoLastModifiedAnyTime
.Execute msoSortByLastModified, msoSortOrderDescending
End With
If blah.FoundFiles.Count = 0 Then
MsgBox "Has a report been generated?"
Exit Function
Else
End If