I am working with Excel 2003. I am trying to run a macro to lookin multiple directories. I get a compile error 'argument not optional. The .SearchFolders gets highlighted.
Code:
With Application.FileSearch
.NewSearch
If fCount > 0 Then
For fCount = 0 To [COLOR=Red] .SearchFolders [/color Red]
End Select
End With
Next
'Change path to suit
'.LookIn = "G:\Investments\Summary\Daily"
'.LookIn = "G:\Investments\Summary\Weekly"
'.LookIn = "G:\Investments\Summary\Daily"
For fCount = 0 To .LookIn = "F:\Investments\Summary\Daily"
For fCount = 1 To .LookIn = "F:\Investments\Summary\Weekly"
For fCount = 2 To .LookIn = "F:\Investments\Summary\Monthly"
'.LookIn = "F:\Investments\Summary\Daily"
.FileType = msoFileTypeExcelWorkbooks
'.Filename = "Book*.xls"