Access Coding Question

E

EAB1977

Hello everyone,

What I am attempting to do is to run a macro on a database that I
created. I can run this just fine since I have the full MS Access
version on my PC, but when I go to others machines that have the
runtime versions, they cannot run it. I get a ActiveX object error. I
have the Access Object Libaray(sp) checked in my References.

Has anyone ran into the problem before, and if so, what was your
workaround?

Sub TestMacro()
Dim appAccess As New Access.Application

appAccess.OpenCurrentDatabase "C:\myDB.mdb"
appAccess.DoCmd.RunMacro "macDoFirst"
appAccess.CloseCurrentDatabase
Set appAccess = Nothing

End Sub
 
J

JLGWhiz

Did you post this in the Access NG also? They would probably have more
knowledge of the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top