Set acApp = CreateObject("Access.Application") Window 7 - XL2010

cwunderlich

Board Regular
Joined
Sep 24, 2010
Messages
101
Hello,

I am trying to work with a VBA macro which loads data from a microsoft excel file onto an Access database. This previously worked under our old systems (which also had Excel 97-03 and a previous version of Windows). This last week we were upgraded to Microsoft Office 2010 and Windows 7.

The code below is the section I found in our current modules which I believe does the loading onto the Access database (I did not create the original code).

However, now, when the macro hits the first line of code shown below I get a Run-Time error '429' error message that says "ActiveX component can't create object"


[/code]
Set acApp = CreateObject("Access.Application")
acApp.Visible = True
acApp.OpenCurrentDatabase ("...filepath\Experience.mdb") 'path to Access database
pathlocation = "..." 'file path of excel file
name = "..." 'what to name the table in the access database
[/code]


I am familiar with VBA, but this sort of syntax is out of my current realm / area of knowledge, so I hope this info is enough to go off of. Any help would be greatly appreciated

Thank you.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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