VBA & Macro Problems

Fix Access VBA Not Opening Excel or Creating Objects

John WilsonJohn Wilson Nov 22, 2026 868 views

Question details

Find out why Access VBA no longer creates an Excel application object or opens a workbook, and why related commands fail without an error.

Fix Access VBA Not Opening Excel or Creating Objects
Product
Microsoft Access VBA and Microsoft Excel
Device & OS
not provided
Scenario
An Access database uses VBA to create an Excel.Application object and open a workbook from a path that the user has checked.
Observed behavior
The Excel object remains Nothing, the workbook does not open, and FileCopy also fails without displaying an error. The code works on a colleague's computer.
Before you start

Confirm that desktop Excel is installed and can open the workbook manually on the affected computer. Have the workbook's full path and access to the Access VBA editor ready.

Solution 1Recommended

Expose the VBA error and inspect each object

Use this approach first when commands appear to fail silently or an object remains Nothing.

1
Review error handling

Open the database in Access and press Alt+F11. Find the affected procedure and check for On Error Resume Next. Temporarily replace it with explicit error handling or use On Error GoTo 0 before the statements you are testing.

2
Set breakpoints

Click in the margin beside CreateObject and the workbook-opening statement in the VBA editor. Run the procedure, then press F8 to step through it.

3
Inspect the results

Open View > Locals Window and inspect the Excel and workbook variables immediately after their assignment statements. If an error is suppressed, inspect Err.Number and Err.Description immediately after the failing statement in the Immediate Window, opened with Ctrl+G.

4
Test late binding

In a standard module, run this test after replacing the path with the full path to an existing workbook: Sub TestExcel() Dim xl As Object Dim wb As Object Dim errorNumber As Long Dim errorDescription As String On Error GoTo Failed Set xl = CreateObject("Excel.Application") Set wb = xl.Workbooks.Open("C:\Path\Book.xlsx") xl.Visible = True Exit Sub Failed: errorNumber = Err.Number errorDescription = Err.Description On Error Resume Next If Not xl Is Nothing Then xl.Quit On Error GoTo 0 MsgBox "Error " & errorNumber & ": " & errorDescription End Sub

Expose the VBA error and inspect each object
Identify the failing statement: Late binding avoids an early-bound Excel library reference in this test, but it still requires Excel to be installed and available for automation. Use the reported error and the statement where it occurs to guide the next check.
Free Microsoft Office alternative

Work with Excel Files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Office files. Its format compatibility helps you move everyday spreadsheet work from Microsoft Office, though it does not fix Access VBA or Excel automation errors.

Open and edit spreadsheets in WPS SpreadsheetCompatible with Microsoft Excel formats including XLSX and XLSFamiliar spreadsheet interface for easier migrationFree, lightweight office suite for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Excel object remain Nothing without an error?

An active On Error Resume Next statement may suppress the error from CreateObject or another assignment. In the VBA editor, inspect the procedure's error handling and check Err.Number and Err.Description immediately after the suspect statement.

How can I test whether an Excel reference is causing the problem?

In the VBA editor, check Tools > References for entries marked MISSING. You can also test Excel automation with an Object variable and CreateObject("Excel.Application"), which avoids an early-bound Excel reference.

What should I check if FileCopy also fails?

Run FileCopy with explicit error handling, using an accessible source file and a new destination filename in a writable folder. Record the error number and description rather than relying on whether a message appears.

Does late binding eliminate the need for Excel?

No. CreateObject("Excel.Application") uses late binding, but Excel must still be installed and available for automation on the computer running the code.

Can WPS Office repair the Access VBA automation failure?

No. Troubleshoot the Access procedure, Excel installation, references, and permissions for that failure. WPS Spreadsheet can be used separately to open and edit compatible Excel files.