PDA

View Full Version : [SOLVED] Open access and run macro in access



chungtinhlak
10-03-2009, 04:03 PM
I have some database that i have to open and run a macro(access macro).

I can get excel to open access but can't figure out the command line to run the macro, please help. The last line is what i have program with.

thanks in advance




Set database(1) = CreateObject("Access.Application")
database(1).Visible = True
database(1).opencurrentdatabase databasepath(1)
database(1).currentdatabase.runmacro ("UPdate")

Bob Phillips
10-04-2009, 01:51 AM
See this thread http://www.vbaexpress.com/forum/showthread.php?t=26739&highlight=access

chungtinhlak
10-05-2009, 05:51 AM
thank you