Option Compare Database
Sub ShowFolderList()
Dim fsoFold As Object
Dim fsoSubFold As Object
Dim fold As Folder
Dim subf, fc
'
Dim fl As Folder
Dim fls As Files
Dim f As File
'
fp = CurrentProject.Path
Set fsoFold = CreateObject("Scripting.FileSystemObject")
Set fold = fsoFold.GetFolder(fp)
Set fc = fold.SubFolders
For Each subf In fc
'Debug.Print subf.Name
spf = CurrentProject.Path
Set fl = fsoSubFold.GetFolder(sfp)
Set fls = fl.Files
For Each f In fls
Debug.Print f.Name
Next
Next
End Sub
|