Fix Excel and Access VBA Error 429 with CurrentProject.Connection
Question details
Resolve VBA run-time error 429 when assigning CurrentProject.Connection to an ADODB.Connection variable after an Office upgrade.

- Product
- Microsoft Excel and Microsoft Access VBA
- Device & OS
- not provided
- Scenario
- A user runs VBA that connects to an Access database after installing Office 2013 over Office 2010.
- Observed behavior
- Excel VBA reports run-time error 429 while assigning CurrentProject.Connection to an ADODB.Connection variable.
In the VBA editor, identify the exact line highlighted when the error occurs and confirm whether the macro is running in Excel or Access. If connecting from Excel, locate the database file and check whether your Office installation is 32-bit or 64-bit under File > Account > About Excel.
Create an ADO connection explicitly in Excel VBA
Use this approach when the macro runs in Excel and needs to connect to an Access database.
CurrentProject.Connection belongs to the Access application object model; it is not an Excel connection. In Excel, create an ADODB.Connection and open the database with an appropriate provider.
The example uses late binding, so it does not require an ADO reference. It does require a compatible Access Database Engine provider.
In Excel, press Alt+F11, then choose Insert > Module.
Add this example and replace the path with your database file: Sub ConnectToAccess() Dim cn As Object Set cn = CreateObject("ADODB.Connection") cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Data\Example.accdb;" ' Use cn for database operations here. cn.Close Set cn = Nothing End Sub
Place the cursor inside ConnectToAccess and press F5. If an error occurs, choose Debug and note whether CreateObject or cn.Open is highlighted.

Check the Access host, ADO reference, and provider
Use these checks when the code runs in Access or when an ADO object cannot be created after the Office upgrade.
Work with Excel files in WPS Office
WPS Office is a free, lightweight Microsoft Office alternative with a familiar interface and compatibility with common Office formats, making it easy to move everyday spreadsheet work. It does not repair Microsoft Office or resolve Access VBA error 429.

Frequently Asked Questions
Why doesn't CurrentProject.Connection work directly in Excel?
CurrentProject is part of the Access application object model, not Excel's. In Excel VBA, create an ADODB.Connection and open the database with a suitable connection string, or access the connection through an Access application object.
Do I need to add an ADO reference in VBA?
A reference is needed for early-bound declarations such as ADODB.Connection. In the VBA editor, choose Tools > References and select an available Microsoft ActiveX Data Objects library. Late-bound code using CreateObject("ADODB.Connection") does not require that reference.
How can I check whether Excel is 32-bit or 64-bit?
In Excel, choose File > Account > About Excel and look for the bitness in the version information. The database provider must be compatible with the bitness of the application using it.
Does error 429 always mean Office needs repair?
No. Error 429 indicates an object could not be created, but the cause depends on the failing statement and environment. Check the host application, ADO object creation, references, and required provider before considering an Office repair.




