Fix Access VBA Not Opening Excel or Creating Objects
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.

- 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.
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.
Expose the VBA error and inspect each object
Use this approach first when commands appear to fail silently or an object remains Nothing.
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.
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.
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.
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

Check references, file permissions, and computer configuration
Use the error details and a comparison with the working computer to narrow down the environmental cause.
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.

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.




