-----Original Message-----
Have you created a reference to the
Microsoft Scripting Runtime in
Tools=>References in the VBE.
No... [small voice] ...I didn't know it existed...
So THAT's now fixed.... Thank you very much !
But now
WeCopy = False
Set TargetList = Application.FileSearch
With TargetList
.LookIn = TargetRoot & Stub
.FileName = SourceName
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) _
'MsgBox "There were " & _
.FoundFiles.Count & " file(s) found."
'For I = 1 To .FoundFiles.Count
' MsgBox .FoundFiles(I)
'Next I
ERROR ! > Text = .FoundFiles(1).Datelastmodified
If SourceDate > _
.FoundFiles(1).Datelastmodified _
Then WeCopy = True
Else
'MsgBox "There were no files found."
WeCopy = True
End If
End With
If WeCopy Then
'Copy Source file to Target
Text = SourceRoot & Stub & SourceName
Text = TargetRoot & Stub & SourceName
On Error Resume Next
MkDir TargetRoot & Stub
Application.CopyFile SourceRoot & Stub & _
SourceName, TargetRoot & Stub & SourceName
On Error GoTo 0
End If
RClay AT haswell DOT com