S
SHIPP
I have the following code.
Dim fs As FileSearch
strSearch = "HRP_*"
Set fs = Application.FileSearch
With fs
.NewSearch
.LookIn = strPath
.filename = strSearch
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For intCount = 1 To .FoundFiles.Count
MsgBox .FoundFiles(intCount)
Next intCount
Else
MsgBox "There were no files found."
End If
End With
The error message I receive is at the dimension statement and it says user
type not defined. Does anybody know what the problem might be?
Dim fs As FileSearch
strSearch = "HRP_*"
Set fs = Application.FileSearch
With fs
.NewSearch
.LookIn = strPath
.filename = strSearch
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For intCount = 1 To .FoundFiles.Count
MsgBox .FoundFiles(intCount)
Next intCount
Else
MsgBox "There were no files found."
End If
End With
The error message I receive is at the dimension statement and it says user
type not defined. Does anybody know what the problem might be?