Dir function error
I cannot duplicate your problem... the code you posted works fine. Are you
by any chance using another Dir command (with a different argument) in the
section you designated "additional logic here"?
--
Rick (MVP - Excel)
"BigJimmer" wrote in message
...
I have the following code...
Dim fName As String
dim DestPath as string
DestPath = ThisWorkbook.Path & "\"
fName = Dir(DestPath & "*.*")
Do Until fName = vbNullString
'additional logic here
fName = Dir
Loop
I get error 5 Invalid procedure call or argument on the line fname = Dir
and
don't understand why.
I am using Excel 2000.
Thanks!
|