Deze code opent een excelbestand dat bestand.xlsx heet en in de zelfde map als de database zit en toont de inhoud van A1 van het eerste werkblad in een MsgBox
Dim xlApp As Excel.Application
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open CurrentProject.Path & "\bestand.xlsx", True, False
Dim Werkmap As Workbook
Set Werkmap = xlApp.Workbooks(1)
Dim Werkblad As Worksheet
Set Werkblad = Werkmap.Sheets(1)
Dim a1 As Range
Set a1 = Werkblad.Range("A1")
MsgBox a1.Value
Set xlApp = Nothing
Set Werkmap = Nothing
Set Werkblad = Nothing