View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Run a MS Access Procedure from Excel

Mark,

Try... Set acApp = CreateObject("Access.Application")

Jim Cone
San Francisco, USA


"Mark" wrote in message
...
I want to execute a subroutine in MS Access database. But I get an error that
"Microsoft Access can't find the procedure 'myModule.mySub.' "

Dim acApp As Access.Application
acApp = CreateObject("Access.Application")
acApp.Application.Visible = True
acApp.OpenCurrentDatabase("C:\myDirectory\myDB.mdb ", True)
acApp.Application.Run("myModule.mySub") 'Error on this line

mySub is defined as a Public sub.
Suggestions?
Thanks, Mark