0
Public Sub InformationManagement(myTable As String)
    Dim myaccess As Object
    Dim mydata As String
    mydata = ThisWorkbook.Path & "\Management.mdb"
    Set myaccess = CreateObject(mydata)
    With myaccess
        .Visible = True
        .DoCmd.OpenTable myTable
        .DoCmd.Maximize
    End With
    Set myaccess = Nothing
End Sub

Row -> Set myaccess = CreateObject(mydata) 中出现消息错误“Run-time error '429' ActiveX component can't create object”

有谁知道如何解决这个问题?非常感谢您

4

1 回答 1

0

我已经有一段时间没有这样做了,但在我的脑海中,它应该更像..

Dim mydata As String
Dim myaccess As Object

mydata = ThisWorkbook.Path & "\Management.mdb"
Set myaccess = CreateObject("Access.Application")
With AccDatabase

    .OpenCurrentDatabase mydata 
    .DoCmd.OpenTable myTable
    .DoCmd.Maximize
End With
Set myaccess = Nothing
于 2013-08-15T08:46:06.430 回答