TransferSpreadsheet

  • Thread starter Thread starter Kirk P.
  • Start date Start date
K

Kirk P.

Using Ken Getz's standard windows file open/save dialog box code. The
ExcelData function does call up the windows open/save dialog box, but when I
try and use it in the TransferSpreadsheet code I get a 2522 Action requires
file name argument error. What am I doing wrong?

Function ExcelExport()
On Error GoTo ExcelExport_Err

DoCmd.TransferSpreadsheet acExport, 10, "qselSymantec", ExcelData, True
DoCmd.Close acForm, "frmDateSelect_Rpt"
MsgBox "Excel file created!", vbInformation, "Export Status"


ExcelExport_Exit:
Exit Function

ExcelExport_Err:
Select Case Err.Number
Case 2522
MsgBox "big problems pal"
Case Else
MsgBox Err.Number & ": " & Err.Description
End Select
Resume ExcelExport_Exit

End Function
 
Back
Top