VBA Code to Open Excel file from MS Access

I am currently working on a MS Access project. But actually I am not an Access master programmer or something. I always learn by doing. So here, I am willing to write my experience. This time, I want to write the code on how to open an Excel file from MS Access using VBA code. I use a button on MS Access and when the button is pressed or clicked, it will open an Excel file directly. So here we go.


Now here is the code to open the test.xls file

[codesyntax lang=”vbnet”]



The above code works with me. I use Microsoft Access 365. You may modify the code to match your need.


Leave a Reply

Your email address will not be published. Required fields are marked *