'Start a new project and add a command button named cmdListFiles
'and then add a reference to the Microsoft Scripting Runtime
Private Sub cmdListFiles_Click()
Dim fso As FileSystemObject
Dim fFile As File
Dim fFolder As Folder
Set fso = New FileSystemObject
Set fFolder = fso.GetFolder(App.Path) 'Open the proper folder path here
Print fFolder.Files.Count
'Clean up the objects
Set fso = Nothing
Set fFile = Nothing
Set fFolder = Nothing
End Sub
Let me know if this helps. If you choose to battle wits with the witless be prepared to lose.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.