title: iterate through a directory of MDB and extract meta data
body: <p>With the code below, we can extract table data from Access file. </p>
  
  <p>Building on this, is it possible to iterate through a directory of MDBs and extract this information 1) without opening each one, or 2) opening each one but not running auto-execute macros.</p>
  
  <pre><code>Function dmwListAllTables() As String
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Dim tbl As AccessObject, db As Object
  Dim strMsg As String
  
  On Error GoTo Error_Handler
  
  Set dB = Application.CurrentData
  For Each tbl In db.AllTables
  Debug.Print tbl.Name
  Next tbl
  
  strMsg = " -- Tables listing complete -- "
  
  Procedure_Done:
  dmwListAllTables = strMsg
  Exit Function
  
  Error_Handler:
  strMsg = Err.Number &amp; " " &amp; Err.Description
  Resume Procedure_Done
  
  End Function
  </code></pre>
  
  <p>souce: <a href="http://www.consultdmw.com/access-VBA-list-objects.htm" rel="nofollow">http://www.consultdmw.com/access-VBA-list-objects.htm</a></p>
  
  <p>BTW. The "loop through" part is not a problem:</p>
  
  <pre><code> Sub REadThroughFiles()
      Dim MyObj As Object, MySource As Object, file As Variant
     file = Dir("c:\myfolder\")
     While (file &lt;&gt; "")
        If InStr(file, "myprefix") &gt; 0 Then
          // do something here...
        End If
       file = Dir
    Wend
  End Sub
  </code></pre>