【VBA】在Excel VBA中调用Access中的过程

注意,这种方式不能打开有密码的文件

Sub RunAccessMacro()
    Dim myAccess As Object
    mydata = ThisWorkbook.path & "\Database1.accdb"
    Set myAccess = CreateObject(mydata)
    myAccess.Visible = False
    myAccess.Run "test"
    Set myAccess = Nothing
End Sub
©️2020 CSDN 皮肤主题: 深蓝海洋 设计师:CSDN官方博客 返回首页