Monday, October 16, 2017

how to run macro in access from excel using vba

how to run macro in access from excel


1. add Access Obj lib reference in MS Excel
2.Create a active x button and paste the following code

Dim acc As New Access.Application
acc.OpenCurrentDatabase ("path")
acc.CurrentProject.Connection.Execute ("SQL comm")
acc.DoCmd.RunMacro("Macro name"

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.