View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Running Access Macro from Excel

I've got the following code that I would like to use to open an Access Macro
from excel however I am getting a compile error -"User defined type not
defined":

Sub AccessTest1()
Dim AccApp As Access.Application
Set AccApp = CreateObject("Access.Application")
Set AccApp.OpenCurrentDatabase ("C:\2008MRD.mdb")=
AccApp.DoCmd.RunMacro "Macro2"
AccApp.Quit
End Sub

Any suggestions as to what I should add/change?

Thanks.
--

Bob