A snippet like this may help:
Dim rs As DAO.Recordset
Dim xlApp As Object, xlWb As Object, xlWs As Object
Set rs = CurrentDb.OpenRecordset("N
Set xlApp = CreateObject("Excel.Applic
Set xlWb = xlApp.Workbooks.Open("c:\f
Set xlWs = xlWb.Worksheets("Name of ws")
xlWs.Range("b47").CopyFrom
xlWb.Close True
Set xlWs = Nothing
Set xlWb = Nothing
xlApp.Quit
Set xlApp = Nothing
rs.Close
Set rs = Nothing
MsgBox "Done"
Main Topics
Browse All Topics





by: YohanFPosted on 2009-09-22 at 05:19:03ID: 25391881
The easiest is the DoCmd.TransferSpreadsheet function -
<TABLE NAME>",<File Path TO SAVE>,<HasFieldNames TRUE OR FALSE>, <Range>
e.g - DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12,"
acSpreadsheetTypeExcel12 = MS Excel 2007
acSpreadsheetTypeExcel9 = MS Excel 97 - 2003