I am trying to open an Access Database from a button within Excel.
However when I attempt to run it I get the following error:
Compile Error
User-defined type not definded
on - db As Access.Application
The code I am using is as follows:
------------------------------------
Dim db As Access.Application
Public Sub OpenDB()
Set db = New Access.Application
db.OpenCurrentDatabase "C:\Data\Report.accdb"
db.Application.Visible = True
End Sub
Bookmarks