TransferSpreadsheet

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top