Call Access Macro From Excel

This allows you to call an access from excel You will first need to go to the Excel VBE and select Tools > References and tick the 'Microsoft Access 11.0 Object Library' option.

Sub RunAccessMacro Dim strDatabasePath As String Dim appAccess As Access.Application strDatabasePath = "C:\My Documents\Access File name.mdb" Set appAccess = New Access.Application With appAccess Application.DisplayAlerts = False .OpenCurrentDatabase strDatabasePath .DoCmd.RunMacro "AccessMacroName" .Quit End With Set appAccess = Nothing End Sub

Code Snippits