Please go back and reformat your code. Use CODE TAGS, and also include the connection information that you are using. You need to use 'late-binding' so that you can use any version of a product.

Code:
Option Explicit
' These are both examples of Late Binding

Public Sub RunAccessMacro(strDB As String, strMacro As String)
'================================================================
'for late binding declare it As Object and use CreateObject() function
  Dim AccessDB As Object
  Set AccessDB = CreateObject("Access.Application")

    With AccessDB
        .OpenCurrentDatabase strDB
        .DoCmd.RunMacro strMacro, 1
        '.Visible = True    'you decide
        .CloseCurrentDatabase
    End With
    Set AccessDB = Nothing

End Sub

Public Sub ExcelMacro()
  Dim excl As Object
  Dim wrbk As Object

    Set excl = CreateObject("Excel.Application")
    excl.DisplayAlerts = False
    Set wrbk = excl.Workbooks.Open("myfile", , True, , "mypassword")
    excl.Run "MacroName", "arg1", "arg2"
End Sub