VBA Open Access DB no longer works

bnstout

New Member
Joined
May 22, 2017
Messages
10
I just received a new machine at my workplace that runs Windows 10 (may matter, may not). This code worked perfectly fine on my old computer, but will not work on this new machine. Does anyone know why? Thanks!

I am running this code from excel and the error I get is at "Set accessApp = CreateObject("Access.Application")

Runtime Error 429: ActiveX component can't create object



Run Access DB

Dim accessApp
Set accessApp = CreateObject("Access.Application")
accessApp.Visible = True
accessApp.OpenCurrentDatabase ("Z:\Supply_Chain_Planning\PFEP Metrics\PFEP Governance Metrics\PFEP Union Database.accdb")
accessApp.DoCmd.RunMacro "RefreshData"
Application.DisplayAlerts = True
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hello and welcome to The Board.
That is an error that I would expect if Microsoft Access is not installed on the PC.
However it would seem that you have left out some code? For example, what is "Run Access DB" meant to do?
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top