title: Trying to Run Access Macro from
body: <p>I am trying to run an Access Macro from Excel.  I set a reference to Microsoft Office 14.0 Access database engine Object Library.  Now, I'm trying to run a small script like this.</p>
  
  <pre><code>Sub RunAccessMacro()
      Dim strDatabasePath As String
      Dim PathToDB As String
      Dim db As DAO.Database
      Dim rs As DAO.Recordset
  
      PathOfDatabase = ThisWorkbook.Worksheets("Updates").Range("PathToAccess")
  
      Set db = DAO.DBEngine.OpenDatabase(PathOfDatabase)
      Set qry = db.Execute("Macro_Run_Key")
  
      qry.Close
      db.Close
  
      MsgBox "Done!  All processes complete!!"
  
  End Sub
  </code></pre>
  
  <p>The problem is, the db.Execute won't execute the Macro.  I don't even see anything like RunMacro, or whatever it's called.</p>
  
  <p><a href="https://i.stack.imgur.com/pPmIK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pPmIK.png" alt="enter image description here"></a></p>
  
  <p>There must be a way to do this, right.</p>