This example takes a recordset, and from it, creates a new recordet in an excel file, which can then be opened in excel
***************************************************
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpszOp As String, _
ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal LpszDir As String, ByVal FsShowCmd As Long) _
As Long
Private Const SW_NORMAL = 1
Public Function ExpExcel_Out()
On Error Resume Next
Kill App.Path & "\temp.xls"
On Error GoTo 0
Dim oConn As Connection
Set oConn = New Connection
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & App.Path & "\temp.xls;" & _
"Extended Properties=""Excel 8.0;HDR=NO;"""
oConn.Execute "create table Data (OrderNumber text, Barcode text, Item text, Description text, College text,[Group] Text, [Date] text, [Time] text, Supplier Text, UnitCost Number);"
Dim oRS As Recordset
Set oRS = New Recordset
oRS.Open "Select * from Data", oConn, adOpenKeyset, adLockOptimistic
Do While Not (rs.EOF)
oRS.AddNew
oRS.Fields(0) = rs.Fields("OrderNumber"

oRS.Fields(1) = rs.Fields("Barcode"

oRS.Fields(2) = rs.Fields("Item"

oRS.Fields(3) = rs.Fields("Description"

oRS.Fields(4) = rs.Fields("College"

oRS.Fields(5) = rs.Fields("Group"

oRS.Fields(6) = rs.Fields("Date"

oRS.Fields(7) = rs.Fields("Time"

oRS.Fields(8) = rs.Fields("Supplier"

oRS.Fields(9) = rs.Fields("UnitCost"
oRS.Update
rs.MoveNext
DoEvents
Loop
oRS.Close
oConn.Close
DoEvents
ShellExecute frmDetailedEnqSUP_on.hwnd, "Open", App.Path & "\temp.xls", "", "C:\", SW_SHOWNORMAL
End Function
**********************************
May the Code Be With You...
----------
x50-8 (X Fifty Eigt)