Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Acess Macro
Hello
I have added a button to my spreadsheet that I would like to Run an Access Macro. When I execute my code I get "Method Or Data Member Missing". I have turned on the MS Access object Reference This is my code Private Sub CommandButton1_Click() Dim appAcc As Access.Application Set appAcc = New Access.Application appAcc.Visible = True appAcc.Open "G:\Mypath\Myfile.mdb" appAcc.RunMacro "MyMcaro" appAcc.Quit Set appAcc = Nothing End Sub What am I doing wrong? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Acess Macro
I think you need to do this:
appAcc.DoCmd.RunMacro "MyMacro" -- - K Dales "Sandy" wrote: Hello I have added a button to my spreadsheet that I would like to Run an Access Macro. When I execute my code I get "Method Or Data Member Missing". I have turned on the MS Access object Reference This is my code Private Sub CommandButton1_Click() Dim appAcc As Access.Application Set appAcc = New Access.Application appAcc.Visible = True appAcc.Open "G:\Mypath\Myfile.mdb" appAcc.RunMacro "MyMcaro" appAcc.Quit Set appAcc = Nothing End Sub What am I doing wrong? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Import from Acess problems with SQL language | Excel Discussion (Misc queries) | |||
Can Excel be linked to MS Acess? | Excel Discussion (Misc queries) | |||
Linking Acess with Excel | Excel Discussion (Misc queries) | |||
Acess x Excell | Excel Discussion (Misc queries) | |||
what is a syntax error in microsoft acess | Charts and Charting in Excel |