B
Bart
Hi all,
I have a macro with the following code:
Set fs = Application.FileSearch
pad$ = CurDir
With fs
.LookIn = pad$
.SearchSubFolders = False
.FileName = "*"
If .Execute() > 0 Then
etc.
But when I run this I get an Error 5 (Invalid procedure call...) when
I get to the line
..FileName = "*"
When I change the parameter in an non-existent filename, the macro
runs and tells me there is no file found (message coded in macro).
Can anybody enlighten me?
I don't see what can be wrong.
TIA!
Bart
I have a macro with the following code:
Set fs = Application.FileSearch
pad$ = CurDir
With fs
.LookIn = pad$
.SearchSubFolders = False
.FileName = "*"
If .Execute() > 0 Then
etc.
But when I run this I get an Error 5 (Invalid procedure call...) when
I get to the line
..FileName = "*"
When I change the parameter in an non-existent filename, the macro
runs and tells me there is no file found (message coded in macro).
Can anybody enlighten me?
I don't see what can be wrong.
TIA!
Bart