Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Compile Error Sub or Function Not Defined . . .

    Here is the code:
    Code:
    Private Sub Command117_Click()
    'Kill the old xls file
    On Error Resume Next
    Kill "D:\flw\Access\qryLACustProg.xls"
    On Error GoTo 0
    'Export the CURRENT data
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryLaCustProg", "D:\flw\Access\", True
    MsgBox ("Finished Exporting qryLACustProg to D:\FLW\ACCESS\")
    EndSub
    I'm going screwy on this when comparing it to other code that works!

    Thanks . . . Rick

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi Rick,

    The last line of the code:
    Code:
    EndSub
    should be two words:
    Code:
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •