Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

Modules: Use Class modules to return Dir and File names

Author(s)
Dev Ashish

Access does not have the standard DirListBox and FileListBox VB controls.  Therefore,  in order to read folder and file information,  you must use code.  Although the TreeView OCX works the best for this since it ends up resembling Windows Explorer the most,  we're limited to using Listboxes with a standard Access install since the OCX only ships with ODE.

    This job is easiest done by a Class module which returns the names of all the files and subfolders in a particular location. This sample database contains the DIR Class Module, along with the API code required to find the installed drive letters.  In addition,  I've included the ShellExecute code as well so that double-clicking an entry in the File Listbox will either execute the file using it's parent application, or if the file type in not known,  it will bring up the Open With dialog.

    Download    Download Explorer.zip. Access 97 version.


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer