B
bart Van Baelen
A macro which had to retrieve .lst-files from a directory
used to work under WIN98 but doesn't work anymore under
WIN2000 (first part of the mqcro is shown below).
Following error message appears for the line '.FileName
= "*.lst"' : invalid procedure call or argument.
How can this be resolved?
Many thanks for your help.
Bart
Set fs = Application.FileSearch
With fs
.LookIn = CurDir
.FileName = "*.lst"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" lst file(s) found."
For I = 1 To .FoundFiles.Count
Documents.Open FileName:=.FoundFiles(I)
used to work under WIN98 but doesn't work anymore under
WIN2000 (first part of the mqcro is shown below).
Following error message appears for the line '.FileName
= "*.lst"' : invalid procedure call or argument.
How can this be resolved?
Many thanks for your help.
Bart
Set fs = Application.FileSearch
With fs
.LookIn = CurDir
.FileName = "*.lst"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" lst file(s) found."
For I = 1 To .FoundFiles.Count
Documents.Open FileName:=.FoundFiles(I)