I have an Access VBA procedure trying to send data to an Excel workbook.
the following code does not work - will not get past the compile stage. Can anyone please suggest what I am doing wrong? I suspect there needs to be a specific ADO/DAO connection specified.
Sub Fetch_Master_Data(ByRef strExcelPath As String)
' This process takes the required data from the Master DB
' and loads it into the Excel workbook
Dim objExcel As Excel.Workbook <<<< COMPILER ERROR HERE
Set objExcel = GetObject(strExcelPath)