Access VBA ways to obtain file system directory listing

mdlueck

Sr. Application Developer
Local time
Today, 12:04
Joined
Jun 23, 2011
Messages
2,637
Greetings,

I am seeking examples of Access VBA (running in MSO 365 Build 16.0.x 32-bit) of how to obtain file system directory listings.

Seems Application.FileSearch is now deprecated / removed. I have heard of using some Microsoft Office Object solution. There might be others that come with standard MS Office. Please kindly advise.

If there is need to utilize an add-on versus native VBA code, then I would like to include the constants in a VBA Include file and use Late-Binding rather than require an add-on be checked within each instance of Access being utilized.

I am thankful,
 
If you're looking for a way to list the files in a directory/folder, then have a look here.
 
It would take a bit of studying, but there is always the "FileSystemObject" (written with no spaces when being referenced as an object). It comes from the Windows Scripting Library.


Browse around with that reference as your starting point. You can get a file (as an object), explore folders via their collection of files, get file properties... great fun.
 

Users who are viewing this thread

Back
Top Bottom