Make a reference to the Microsoft.Excel. Here's my spreadsheet code:
Public Sub PrintToXLS(strQryName As String, strTitle As String, intDataStartCol As Integer, Optional intDataStartRow = 2)
On Error GoTo err_trap
Dim xls As Excel.Application
Dim wb As Excel.Workbook
Dim myRange As Excel.Range...