troubleshooting Question

Run Access code from Excel

Microsoft AccessMicrosoft Excel
11 Comments1 Solution543 ViewsLast Modified:
Hi Experts,

I have a access database with a Sub, that i would like to execute from Excel.

I have found this code, that works:
Dim A As Object
Set A = CreateObject("Access.Application")
A.Visible = True
A.OpenCurrentDatabase ("C:\Documents and Settings\rcrill\My
A.Run "ImportExcel"<---------------------This Fails

Open in new window

But i my case the database is already open, so is it possible to just tell the already open database to just run the Sub without opening the same database again?
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros