View Single Post
  #30 (permalink)  
Old 01-29-2008, 06:33 AM
BurgoEng BurgoEng is offline
Junior Member
 
Join Date: Oct 2007
Posts: 28
iTrader: (0)
BurgoEng is on a distinguished road
Default

Try this code:

Dim objAcc As Access.Application
Set objAcc = New Access.Application
With objAcc
.OpenCurrentDatabase "C:\Accessdb.mdb"
.DoCmd.RunMacro ("runmac")
.CloseCurrentDatabase
.Quit
End With
Set objAcc = Nothing


If you get any error message then go to VB Editor, go to Tools > References and check the box beside Microsoft Access X.X Object Library (the X.X represents whatever version number you have).
Reply With Quote