Dir function error
I'm going to go out on a limp. This code isn't tested, but try:
Dim fName As String
Dim DestPath As String
DestPath = ThisWorkbook.Path & "\"
fName = Dir(DestPath & "*.*")
Do Until fName = ""
'additional logic here
fName = Dir("")
Loop
Hope this helps! If so, let me know, click "YES" below.
--
Cheers,
Ryan
"BigJimmer" wrote:
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!
|