If you are new to Access you want simple. The best way is to go to the button properties and under On Click paste this code. All you will have to do is change the path, the directory where the excel sheet is located.
Additionally in the code page of Access you will need to go to tools >>Reference
Select the following object library. This step you will have to do for any of the code examples provided. "Microsoft Excel xx.0 Library" xx version of excel, pick the latest.
-
use xlApp.Workboks.Open
-
-
Dim xlApp As Excel.Application
-
Dim xlWB1 As Excel.Workbook
-
-
Set xlApp = New Excel.Application
-
-
xlApp.Visible = True
-
-
Set xlWB1 = xlApp.Workbooks.Open("e:\paige\vb program\delinquent.xls")
-
-
xlWB1.Close
-
-
Set xlWB1 = Nothing
-
-
xlApp.Quit
-
-
Set xlApp = Nothing
-
-