title: Get the VBProject of a Database
body: <p>Given a database object in MS Access VBA, how can one get that database's VBProject?</p>
  
  <pre><code>Function GetVBProject(ByVal db As Database) As VBProject
      Set GetVBProject = ???
  End Function
  </code></pre>
  
  <p>The only way I know how to get VBProjects in Access is through <code>Application.VBE.VBProjects.Item(???)</code>.  However, I won't know what order of the projects are in and what the name is.  I will only know it's parent database. The equivalent in Excel would be simply</p>
  
  <pre><code>Function GetVBProject(ByVal wb As Workbook) As VBProject
      Set GetVBProject = wb.VBProject
  End Function
  </code></pre>