'To check whether the file exists use Dir or file system object FSO.fileexists
'To list files within a folder try the below code
Sub FileList()
Dim strFile As string
Dim strFolder As string
strFolder = "c:\"
strFile = Dir(strFolder & "*.*", vbNormal)
Do While strFile < ""
MsgBox strFolder & strFile
strFile = Dir
Loop
End Sub
For recursion refer..
http://www.cpearson.com/excel/RecursionAndFSO.htm
'For an add-in that automatically lists folders, subfolders and files.
http://www.cpearson.com/excel/FolderTree.aspx
If this post helps click Yes
---------------
Jacob Skaria
"John" wrote:
I have recently updated to Excel2007. Great.!!! Several days ago I posted in
this forum a stupid post. I assumed my problems were due to 32 bit vs. 64
bit application. My bad.
Unfortunately I have several macros which have been operating since 2001
which depend on "application.filesearch". It has been eliminated in Excel
2007. So far, all of my search efforts have not found a work-around that can
be rapidly applied to my existing code.
Has anyone found a solution??
John