Private Sub outexcel_Click()
On Error GoTo Err_outexcel_Click
Me.subform1.SetFocus
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
Dim obj As Object
Set obj = CreateObject("Excel.Application")
obj.Workbooks.add
obj.Visible = True
SendKeys "^v"
Exit_outexcel_Click:
Exit Sub
Err_outexcel_Click:
MsgBox Err.Description
Resume Exit_outexcel_Click
End Sub