View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Run Access macro from Excel Spreadsheet

Karen

You can automate Access like so

Sub AutomateAccess()
Dim acApp As Access.Application
Set acApp = New Access.Application
acApp.OpenCurrentDatabase ("C:\db1.mdb")
acApp.DoCmd.RunMacro "Test", , ""
End Sub

This uses early binding so you will need to set a reference to the MS access
library in advance via the VBE in Excel (ToolsReferences...)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Karen" wrote in message
...
Is it possible to run an Access macro from an Excel spreadsheet?