View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BigJimmer BigJimmer is offline
external usenet poster
 
Posts: 37
Default Dir function error

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!