Open Excel file from MS Access using VBA

July 5, 2015 | By | Reply More

This is a note for my self when learning the VBA Access. I will show you how to open an Excel file (.xlsx) from Microsof Access Form using VBA. Its not hard to open a Microsoft Excel using VBA from MS Access.

First, we need to add Excel Object library first. To do this, go to Tools | References and look for Microsoft Excel 15.0 ObjectLibrary. Enable it and press OK.

ms excel object library

Now we need to create the following code:

[codesyntax lang=”vbnet”]


The code above will open file located in “D:\test.xlsx”

Tags: , ,

Category: Microsoft Access, VBA

Leave a Reply