View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default run access macro from excel pass parameter

The following works for me (change parameters and include full path to your db:

Dim oAccess As Object, oDB As Object
Set oAccess = CreateObject("Access.Application")
oAccess.Visible = True
oAccess.OpenCurrentDatabase "MyFullDBPathName.mdb"
oAccess.Run "MyTestMacro", "MyParameter"

HTH

"Souris" wrote:

I need run an Access macro from Excel spreadsheet and pass a paramter from a
cell of the spreadsheet.

Is it possible to have a macro to accept paramter in Access?
If yes, can I pass parameter from excel to access macro?
If yes, any example to do so?

Your information is great appreciated,