Use DIR command
Several examples
===============
sPath$ = ThisWorkbook.Path & "\Data"
sFname$ = "Data.xls"
sFile$ = sPath & "\" & sFname
If Dir(sPath, vbDirectory) = "" Then
MkDir (sPath)
End If
===============
If Dir(sFile) = "" Then
Exit Sub
End If
===================
sDir = Dir(sPath & "\*.*")
Do
If sDir = "" Then
Exit Do
End If
more code here
sDir = Dir ' gets the next file
Loo
--
Message posted from
http://www.ExcelForum.com